#include "Basic/String.hpp"#include "Basic/AStringable.hpp"#include "Basic/Utilities.hpp"#include <algorithm>#include <iostream>#include <sstream>#include <string.h>#include <regex>#include <locale>#include <ctype.h>#include <stdio.h>#include <stddef.h>#include <stdint.h>#include <stdarg.h>#include <math.h>Classes | |
| class | dec_separator< T > |
Enumerations | |
| enum | charTypeT { other , alpha , digit } |
Functions | |
| std::regex | _protectRegexp (const String &match) |
| String | toUpper (const String &string) |
| String | toLower (const String &string) |
| void | toUpper (String &string) |
| void | toLower (String &string) |
| charTypeT | _charType (char c) |
| String | incrementStringVersion (const String &string, int rank, const String &delim) |
| String | concatenateString (const String &string, double value, const String &delim) |
| String | concatenateStrings (const String &delim, const String &string1, const String &string2, const String &string3, const String &string4) |
| VectorString | generateMultipleNames (const String &radix, int number, const String &delim) |
| void | correctNamesForDuplicates (VectorString &list) |
| void | correctNewNameForDuplicates (VectorString &list, int rank) |
| int | getRankInList (const VectorString &list, const String &match, bool caseSensitive) |
| int | decodeInString (const String &symbol, const String &node, int *facies, bool caseSensitive) |
| int | decodeInList (const VectorString &symbols, const String &node, int *rank, int *facies, bool caseSensitive) |
| bool | matchRegexp (const String &string1, const String &string2, bool caseSensitive) |
| bool | matchKeyword (const String &string1, const String &string2, bool caseSensitive) |
| VectorString | expandList (const VectorString &list, const String &match, bool onlyOne) |
| VectorString | expandList (const VectorString &list, const VectorString &matches) |
| int | getMaxStringSize (const VectorString &list) |
| VectorString | separateKeywords (const String &code) |
| int | toInteger (const String &v) |
| double | toDouble (const String &v, char dec) |
| String | toString (int value) |
| String | toString (double value) |
| int | askInt (const String &text, int defval, bool authTest) |
| double | askDouble (const String &text, double defval, bool authTest) |
| int | askBool (const String &text, bool defval) |
| String | trimRight (const String &s, const String &t) |
| String | trimLeft (const String &s, const String &t) |
| String | trim (const String &s, const String &t) |
| String | erase (const String &s, const String &t) |
| char * | gslStrcpy (char *dst, const char *src) |
| char * | gslStrcat (char *dst, const char *src) |
| int | gslSPrintf (char *dst, const char *fmt,...) |
| int | gslScanf (const char *format,...) |
| int | gslSScanf (const char *str, const char *format,...) |
| int | gslFScanf (FILE *stream, const char *format,...) |
| char * | gslStrtok (char *str, const char *delim) |
| char * | gslStrncpy (char *dest, const char *src, size_t n) |
| VectorInt | decodeGridSorting (const String &string, const VectorInt &nx, bool verbose) |
| enum charTypeT |
| charTypeT _charType | ( | char | c | ) |
| std::regex _protectRegexp | ( | const String & | match | ) |
Protect the matching pattern against Crash which happens when the string contains "*" without any preceding character
| match | Initial matching pattern |
| int askBool | ( | const String & | text, |
| bool | defval | ||
| ) |
Ask interactively for the value of one boolean
| text | Text of the question |
| defval | Default value |
| double askDouble | ( | const String & | text, |
| double | defval, | ||
| bool | authTest | ||
| ) |
Ask interactively for the value of one Real (Double)
| text | Text of the question |
| defval | Default value (or IFFFF) |
| authTest | True if a TEST answer is authorized (TEST) |
| int askInt | ( | const String & | text, |
| int | defval, | ||
| bool | authTest | ||
| ) |
Ask interactively for the value of one integer
| text | Text of the question |
| defval | Default value (or IFFFF) |
| authTest | True if TEST value is authorized (TEST) |
| String concatenateStrings | ( | const String & | delim, |
| const String & | string1, | ||
| const String & | string2, | ||
| const String & | string3, | ||
| const String & | string4 | ||
| ) |
| void correctNamesForDuplicates | ( | VectorString & | list | ) |
Check that the names in 'list' are not conflicting with any previous name. If it does, increment its name by a version number.
| list |
| void correctNewNameForDuplicates | ( | VectorString & | list, |
| int | rank | ||
| ) |
Decode the grid sorting order
| [in] | string | Name of the sorting string |
| [in] | nx | Array giving the number of cells per direction |
| [in] | verbose | Verbose flag |
| int decodeInList | ( | const VectorString & | symbols, |
| const String & | node, | ||
| int * | rank, | ||
| int * | facies, | ||
| bool | caseSensitive | ||
| ) |
Decode the input string 'node' as a one-character keyword followed by an integer rank The keyword must match one of the symbols: its rank is 'rank' The integer rank is returned as 'facies'
| symbols | |
| node | |
| rank | |
| facies | |
| caseSensitive |
Decode the input string 'node' as a one-character keyword followed by an integer rank The keyword must match the symbol. The integer rank is returned as 'facies'
| symbol | |
| node | |
| facies | |
| caseSensitive |
| VectorString expandList | ( | const VectorString & | list, |
| const String & | match, | ||
| bool | onlyOne | ||
| ) |
Returns the list of matching names
| list | List of eligible names |
| match | Name to be expanded |
| onlyOne | True if the expanded list may only contain a single name |
| VectorString expandList | ( | const VectorString & | list, |
| const VectorString & | matches | ||
| ) |
| VectorString generateMultipleNames | ( | const String & | radix, |
| int | number, | ||
| const String & | delim | ||
| ) |
| int getMaxStringSize | ( | const VectorString & | list | ) |
Returns the maximum string size of a list of strings
| list | List of strings |
| int getRankInList | ( | const VectorString & | list, |
| const String & | match, | ||
| bool | caseSensitive | ||
| ) |
Return the rank of the (first) item in 'list' which matches 'match'
| list | List of keywords used for search |
| match | Searched pattern |
| caseSensitive | Case Sensitive flag |
| int gslFScanf | ( | FILE * | stream, |
| const char * | format, | ||
| ... | |||
| ) |
| int gslScanf | ( | const char * | format, |
| ... | |||
| ) |
| int gslSPrintf | ( | char * | dst, |
| const char * | fmt, | ||
| ... | |||
| ) |
| int gslSScanf | ( | const char * | str, |
| const char * | format, | ||
| ... | |||
| ) |
| char* gslStrcat | ( | char * | dst, |
| const char * | src | ||
| ) |
| char* gslStrcpy | ( | char * | dst, |
| const char * | src | ||
| ) |
| char* gslStrncpy | ( | char * | dest, |
| const char * | src, | ||
| size_t | n | ||
| ) |
| char* gslStrtok | ( | char * | str, |
| const char * | delim | ||
| ) |
Check if two keywords are similar, up to their case
| string1 | First keyword |
| string2 | Second keyword |
| caseSensitive | true if the case of both strings should be considered Otherwise, both strings are converted into upper case before comparison |
Check if two keywords match up to "Regular Expression" on the second string and their case
| string1 | First keyword |
| string2 | Second keyword (through Regular Expression interpretation) |
| caseSensitive | true if the case of both strings should be considered Otherwise, both strings are converted into upper case before comparison |
| VectorString separateKeywords | ( | const String & | code | ) |
Separate keywords in the input string The keywords are identified when switching between alpha, digit and other
| code | String to be split |
| double toDouble | ( | const String & | v, |
| char | dec | ||
| ) |
| int toInteger | ( | const String & | v | ) |
Decode an integer from a string. Returns ITEST if impossible
| v | String to be decoded |
| void toLower | ( | String & | string | ) |
| String toString | ( | double | value | ) |
| String toString | ( | int | value | ) |
| void toUpper | ( | String & | string | ) |