 |
OpendTect
6.6
|
Go to the documentation of this file.
63 inline int toInt(
const char* s,
int defval=0 )
64 {
int ret = defval;
getFromString( ret, s, ret );
return ret; }
69 inline float toFloat(
const char* s,
float defval=0 )
70 {
float ret = defval;
getFromString( ret, s, ret );
return ret; }
72 inline double toDouble(
const char* s,
double defval=0 )
73 {
double ret = defval;
getFromString( ret, s, ret );
return ret; }
75 inline bool toBool(
const char* s,
bool defval=
true )
79 #define mSkipBlanks(ptr) \
80 { if ( ptr ) { while ( *(ptr) && iswspace(*(ptr)) ) (ptr)++; } }
83 #define mSkipNonBlanks(ptr) \
84 { if ( ptr ) { while ( *(ptr) && !iswspace(*(ptr)) ) (ptr)++; } }
87 #define mTrimBlanks(ptr) \
88 { mSkipBlanks(ptr); removeTrailingBlanks(ptr); }
92 int match_nrchars=-1);
95 const char* maybebigger);
100 const char* maybebigger);
160 int startnr=0,
int nr_chars_to_match=0,
165 int startnr=0,
int nr_chars_to_match=0,
172 bool parensonunit,
char* str=
nullptr);
182 const char* length=
nullptr,
183 const char* flags=
nullptr);
bool stringStartsWith(const char *startstring, const char *maybebigger)
#define od_uint64
Definition: plftypes.h:36
int getIndexInStringArrCI(const char *, const char *const *arr, int startnr=0, int nr_chars_to_match=0, int notfoundidx=-1)
bool toBool(const char *s, bool defval=true)
Definition: string2.h:75
int toInt(const char *s, int defval=0)
Definition: string2.h:63
int64_t toInt64(const char *s, int64_t defval=0)
Definition: string2.h:66
bool stringEndsWith(const char *endstring, const char *maybebigger)
bool isNumberString(const char *, bool int_only=false)
const char * getNextWord(const char *, char *)
float toFloat(const char *s, float defval=0)
Definition: string2.h:69
#define mGlobal(module)
Definition: commondefs.h:180
Set of BufferString objects.
Definition: bufstringset.h:26
#define od_int64
Definition: plftypes.h:35
OpendTect.
Definition: commontypes.h:28
double toDouble(const char *s, double defval=0)
Definition: string2.h:72
bool stringEndsWithCI(const char *, const char *)
const char * getRankPostFix(int)
@ String
Definition: odjson.h:40
const char * getLimitedDisplayString(const char *, int nrchars, bool trimright)
const char * getBytesString(uint64_t)
bool caseInsensitiveEqual(const char *, const char *, int match_nrchars=-1)
void removeTrailingBlanks(char *)
bool isAlphaNumString(const char *, bool allowspace=false)
char * truncateString(char *str, int maxlen)
const char * getDistUnitString(bool isfeet, bool withparentheses)
const char * cformat(char specifier, unsigned short width=0, unsigned short precision=0, const char *length=nullptr, const char *flags=nullptr)
bool stringStartsWithCI(const char *, const char *)
void cleanupString(char *, bool, bool, bool)
const char * getNextNonBlanks(const char *, char *)
bool yesNoFromString(const char *)
#define od_uint16
Definition: plftypes.h:27
void set(T &_to, const F &fr)
template based type conversion
Definition: convert.h:27
const char * toString(int)
#define od_int32
Definition: plftypes.h:30
const char * lastOcc(const char *, char)
encapsulates the read-access-only part of strings in OD.
Definition: odstring.h:31
const char * getVelUnitString(bool isfeet, bool withparentheses)
const char * getAreaString(float m2, bool parensonunit, char *str=nullptr)
const char * getYesNoString(bool)
Concatenated short keys separated by dots. Used for Object identifiers in the Object Manager,...
Definition: compoundkey.h:23
const char * firstOcc(const char *, char)
const char * toStringLim(float, int maxtxtwdth)
const char * toStringPrecise(float)
const char * getNextWordElem(const char *, char *)
bool getFromString(int &, const char *, int udfval)
#define od_uint32
Definition: plftypes.h:31
Generated at
for the OpendTect
seismic interpretation project.
Copyright (C): dGB Beheer B.V. 1995-2021