![]() |
OpendTect
6.6
|
Go to the source code of this file.
Namespaces | |
| OD | |
| OpendTect. | |
Macros | |
| #define | mSkipBlanks(ptr) { if ( ptr ) { while ( *(ptr) && iswspace(*(ptr)) ) (ptr)++; } } |
| Advances given pointer to first non-whitespace. More... | |
| #define | mSkipNonBlanks(ptr) { if ( ptr ) { while ( *(ptr) && !iswspace(*(ptr)) ) (ptr)++; } } |
| Advances given pointer to first whitespace More... | |
| #define | mTrimBlanks(ptr) { mSkipBlanks(ptr); removeTrailingBlanks(ptr); } |
| Advances to first whitespace and removes trailing whitespace. More... | |
Functions | |
| const char * | toString (int) |
| const char * | toString (unsigned int) |
| const char * | toString (int64_t) |
| const char * | toString (uint64_t) |
| const char * | toString (float) |
| const char * | toString (float, int nrdec) |
| const char * | toString (float, char format, int precision) |
| const char * | toStringLim (float, int maxtxtwdth) |
| const char * | toStringPrecise (float) |
| const char * | toString (double) |
| const char * | toString (double, int nrdec) |
| const char * | toString (double, char format, int precision) |
| const char * | toStringLim (double, int maxtxtwdth) |
| const char * | toStringPrecise (double) |
| const char * | toString (bool) |
| const char * | toString (signed char) |
| const char * | toString (unsigned char) |
| const char * | toString (short) |
| const char * | toString (unsigned short) |
| const char * | toString (const char *) |
| const char * | toString (const OD::String &) |
| const char * | toString (const CompoundKey &) |
| bool | getFromString (int &, const char *, int udfval) |
| bool | getFromString (int64_t &, const char *, int64_t udfval) |
| bool | getFromString (float &, const char *, float udfval) |
| bool | getFromString (double &, const char *, double udfval) |
| bool | getFromString (bool &, const char *) |
| bool | yesNoFromString (const char *) |
| int | toInt (const char *s, int defval=0) |
| int64_t | toInt64 (const char *s, int64_t defval=0) |
| float | toFloat (const char *s, float defval=0) |
| double | toDouble (const char *s, double defval=0) |
| bool | toBool (const char *s, bool defval=true) |
| bool | caseInsensitiveEqual (const char *, const char *, int match_nrchars=-1) |
| bool | stringStartsWith (const char *startstring, const char *maybebigger) |
| bool | stringStartsWithCI (const char *, const char *) |
| bool | stringEndsWith (const char *endstring, const char *maybebigger) |
| bool | stringEndsWithCI (const char *, const char *) |
| void | removeTrailingBlanks (char *) |
| void | cleanupString (char *, bool, bool, bool) |
| bool | isNumberString (const char *, bool int_only=false) |
| bool | isAlphaNumString (const char *, bool allowspace=false) |
| const char * | getNextWord (const char *, char *) |
| const char * | getNextWordElem (const char *, char *) |
| const char * | getNextNonBlanks (const char *, char *) |
| const char * | firstOcc (const char *, char) |
| char * | firstOcc (char *, char) |
| const char * | lastOcc (const char *, char) |
| char * | lastOcc (char *, char) |
| const char * | firstOcc (const char *, const char *) |
| char * | firstOcc (char *, const char *) |
| const char * | lastOcc (const char *, const char *) |
| char * | lastOcc (char *, const char *) |
| const char * | getYesNoString (bool) |
| const char * | getDistUnitString (bool isfeet, bool withparentheses) |
| const char * | getVelUnitString (bool isfeet, bool withparentheses) |
| const char * | getRankPostFix (int) |
| const char * | getBytesString (uint64_t) |
| const char * | getLimitedDisplayString (const char *, int nrchars, bool trimright) |
| int | getIndexInStringArrCI (const char *, const char *const *arr, int startnr=0, int nr_chars_to_match=0, int notfoundidx=-1) |
| int | getIndexInStringArrCI (const char *, const BufferStringSet set, int startnr=0, int nr_chars_to_match=0, int notfoundidx=-1) |
| const char * | getAreaString (float m2, bool parensonunit, char *str=nullptr) |
| const char * | getAreaString (float m2, bool xyinfeet, int precision, bool parensonunit, char *str=nullptr) |
| char * | truncateString (char *str, int maxlen) |
| const char * | cformat (char specifier, unsigned short width=0, unsigned short precision=0, const char *length=nullptr, const char *flags=nullptr) |
| #define mSkipBlanks | ( | ptr | ) | { if ( ptr ) { while ( *(ptr) && iswspace(*(ptr)) ) (ptr)++; } } |
Advances given pointer to first non-whitespace.
| #define mSkipNonBlanks | ( | ptr | ) | { if ( ptr ) { while ( *(ptr) && !iswspace(*(ptr)) ) (ptr)++; } } |
Advances given pointer to first whitespace
| #define mTrimBlanks | ( | ptr | ) | { mSkipBlanks(ptr); removeTrailingBlanks(ptr); } |
Advances to first whitespace and removes trailing whitespace.
| bool caseInsensitiveEqual | ( | const char * | , |
| const char * | , | ||
| int | match_nrchars = -1 |
||
| ) |
stricmp with option to compare part, default is all
| const char* cformat | ( | char | specifier, |
| unsigned short | width = 0, |
||
| unsigned short | precision = 0, |
||
| const char * | length = nullptr, |
||
| const char * | flags = nullptr |
||
| ) |
Creates a format string for printing: %[flags][width][.precision][length]specifier
| void cleanupString | ( | char * | , |
| bool | , | ||
| bool | , | ||
| bool | |||
| ) |
replaces whitespace, file separators, dots -> underscores.
| char* firstOcc | ( | char * | , |
| char | |||
| ) |
Replacement for strchr: non-const version
| char* firstOcc | ( | char * | , |
| const char * | |||
| ) |
Replacement for strstr: non-const version
| const char* firstOcc | ( | const char * | , |
| char | |||
| ) |
Replacement for strchr: const version
| const char* firstOcc | ( | const char * | , |
| const char * | |||
| ) |
Replacement for strstr: const version
| const char* getAreaString | ( | float | m2, |
| bool | parensonunit, | ||
| char * | str = nullptr |
||
| ) |
| const char* getAreaString | ( | float | m2, |
| bool | xyinfeet, | ||
| int | precision, | ||
| bool | parensonunit, | ||
| char * | str = nullptr |
||
| ) |
Returns a string with an area and its unit, depending on survey and area size, unit is ft^2, m^2, km^2 or mile^2.
| const char* getBytesString | ( | uint64_t | ) |
returns a nicely, readable size, in bytes, KB, MB, GB, or TB
| const char* getDistUnitString | ( | bool | isfeet, |
| bool | withparentheses | ||
| ) |
returns ptr to static buffer with "m" or "ft"
| bool getFromString | ( | bool & | , |
| const char * | |||
| ) |
| bool getFromString | ( | double & | , |
| const char * | , | ||
| double | udfval | ||
| ) |
| bool getFromString | ( | float & | , |
| const char * | , | ||
| float | udfval | ||
| ) |
| bool getFromString | ( | int & | , |
| const char * | , | ||
| int | udfval | ||
| ) |
| bool getFromString | ( | int64_t & | , |
| const char * | , | ||
| int64_t | udfval | ||
| ) |
| int getIndexInStringArrCI | ( | const char * | , |
| const BufferStringSet | set, | ||
| int | startnr = 0, |
||
| int | nr_chars_to_match = 0, |
||
| int | notfoundidx = -1 |
||
| ) |
Finds a string in string array, case insensitive
| int getIndexInStringArrCI | ( | const char * | , |
| const char *const * | arr, | ||
| int | startnr = 0, |
||
| int | nr_chars_to_match = 0, |
||
| int | notfoundidx = -1 |
||
| ) |
Finds a string in string array, case insensitive
| const char* getLimitedDisplayString | ( | const char * | , |
| int | nrchars, | ||
| bool | trimright | ||
| ) |
returns a string for display, never larger than nrchars
| const char* getNextNonBlanks | ( | const char * | , |
| char * | |||
| ) |
fills a buffer with the next sequence of nonblanks. It returns a ptr just after the sequence. Last word reached if the filled buffer is empty.
| const char* getNextWord | ( | const char * | , |
| char * | |||
| ) |
Deprecated: choose between getNextWordElem and getNextNonBlanks.
| const char* getNextWordElem | ( | const char * | , |
| char * | |||
| ) |
fills a buffer with the next 'word' (delimited by whitespace or quotes). It returns a ptr just after the word, or NULL. Empty words do exist; end is reached if NULL is returned.
| const char* getRankPostFix | ( | int | ) |
returns "th" or "st" or "nd" or "rd"; like in 1st, 2nd, 3rd etc.
| const char* getVelUnitString | ( | bool | isfeet, |
| bool | withparentheses | ||
| ) |
returns ptr to static buffer with "m/s" or "ft/s"
| const char* getYesNoString | ( | bool | ) |
returns ptr to static buffer with "yes" or "No".
| bool isAlphaNumString | ( | const char * | , |
| bool | allowspace = false |
||
| ) |
tells whether has printable characters only.
| bool isNumberString | ( | const char * | , |
| bool | int_only = false |
||
| ) |
tells whether a string holds a parseable number
| char* lastOcc | ( | char * | , |
| char | |||
| ) |
Replacement for strrchr: non-const version
| char* lastOcc | ( | char * | , |
| const char * | |||
| ) |
Replacement for (imaginary) strrstr: non-const version
| const char* lastOcc | ( | const char * | , |
| char | |||
| ) |
Replacement for strrchr: const version
| const char* lastOcc | ( | const char * | , |
| const char * | |||
| ) |
Replacement for (imaginary) strrstr: const version
| void removeTrailingBlanks | ( | char * | ) |
bluntly puts a '\0' on trailing white space.
| bool stringEndsWith | ( | const char * | endstring, |
| const char * | maybebigger | ||
| ) |
checks whether a string is the end of another string.
| bool stringEndsWithCI | ( | const char * | , |
| const char * | |||
| ) |
is a case insensitive version of stringEndsWith
| bool stringStartsWith | ( | const char * | startstring, |
| const char * | maybebigger | ||
| ) |
checks whether a string is the start of another string.
| bool stringStartsWithCI | ( | const char * | , |
| const char * | |||
| ) |
is a case insensitive version of matchString
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| const char* toString | ( | bool | ) |
| const char* toString | ( | const char * | ) |
| const char* toString | ( | const CompoundKey & | ) |
| const char* toString | ( | const OD::String & | ) |
| const char* toString | ( | double | ) |
| const char* toString | ( | double | , |
| char | format, | ||
| int | precision | ||
| ) |
| const char* toString | ( | double | , |
| int | nrdec | ||
| ) |
| const char* toString | ( | float | ) |
| const char* toString | ( | float | , |
| char | format, | ||
| int | precision | ||
| ) |
| const char* toString | ( | float | , |
| int | nrdec | ||
| ) |
| const char* toString | ( | int | ) |
| const char* toString | ( | int64_t | ) |
| const char* toString | ( | short | ) |
| const char* toString | ( | signed char | ) |
| const char* toString | ( | uint64_t | ) |
| const char* toString | ( | unsigned char | ) |
| const char* toString | ( | unsigned int | ) |
| const char* toString | ( | unsigned short | ) |
| const char* toStringLim | ( | double | , |
| int | maxtxtwdth | ||
| ) |
| const char* toStringLim | ( | float | , |
| int | maxtxtwdth | ||
| ) |
| const char* toStringPrecise | ( | double | ) |
| const char* toStringPrecise | ( | float | ) |
| char* truncateString | ( | char * | str, |
| int | maxlen | ||
| ) |
If str is longer than maxlen-4, string will be truncated and a " ..." will be appended".
| bool yesNoFromString | ( | const char * | ) |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2021