45 inline bool operator!=(
const T& t )
const {
return !(*
this==t); }
47 inline const char*
buf()
const {
return gtBuf(); }
48 inline const char*
str()
const {
return gtStr(); }
49 inline operator const char*()
const {
return gtBuf(); }
50 unsigned int size()
const;
51 inline bool isEmpty()
const {
return !gtStr(); }
52 inline const char& operator [](
int idx )
const {
return gtBuf()[idx]; }
53 virtual char firstChar()
const {
return gtBuf()[0]; }
55 # define mODStringDefSens CaseSensitivity c=CaseSensitive 63 bool contains(
char)
const;
64 bool contains(
const char*)
const;
65 const char*
find(
char)
const;
66 const char* findLast(
char)
const;
67 const char*
find(
const char*)
const;
68 const char* findLast(
const char*)
const;
70 unsigned int count(
char)
const;
71 unsigned int getLevenshteinDist(
const char*,
bool casesens)
const;
73 bool isNumber(
bool int_only=
false)
const;
80 bool operator >(
const char*)
const;
81 bool operator <(
const char*)
const;
83 inline bool operator >(
const T&)
const;
85 inline bool operator <(
const T&)
const;
87 static const String& empty();
91 virtual const char* gtBuf()
const = 0;
93 virtual const char* gtStr()
const = 0;
114 {
return *
this > (
toString( t ) ); }
117 {
return *
this < (
toString( t ) ); }
#define mExpClass(module)
Definition: commondefs.h:160
int toInt(const char *s, int defval=0)
Definition: string2.h:73
float toFloat(const char *s, float defval=0)
Definition: string2.h:67
const char * str() const
Definition: odstring.h:48
bool operator==(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:53
virtual ~String()
Definition: odstring.h:36
#define mODStringDefSens
Definition: odstring.h:55
double toDouble(const char *s, double defval=0)
Definition: string2.h:70
bool operator<(const char *) const
bool isEqual(const char *, CaseSensitivity c=CaseSensitive) const
encapsulates the read-access-only part of strings in OD.
Definition: odstring.h:31
bool operator>(const char *) const
bool operator==(const String &) const
Definition: odstring.h:100
bool operator!=(const ArrayNDInfo &a1, const ArrayNDInfo &a2)
Definition: arrayndinfo.h:62
const T * find(const ObjectSet< T > &os, const S &val)
Get const object in set.
Definition: objectset.h:183
virtual char firstChar() const
Definition: odstring.h:53
const char * buf() const
Definition: odstring.h:47
bool operator!=(const T &t) const
Definition: odstring.h:45
bool isEmpty() const
Definition: odstring.h:51
OpendTect.
Definition: commontypes.h:29
Export_Basic const char * toString(PythonSource)
bool operator!=(const String &) const
Definition: odstring.h:102
bool toBool(const char *s, bool defval=true)
Definition: string2.h:64