OpendTect
7.0
|
OD::String that holds an existing text string. More...
Public Member Functions | |
StringView (const char *p=nullptr) | |
char | firstChar () const override |
bool | isNull () const |
operator bool () const | |
operator const char * () const | |
bool | operator! () const |
bool | operator!= (const BufferString &) const |
bool | operator!= (const char *s) const |
bool | operator!= (const OD::String &s) const |
bool | operator!= (const StringView &fs) const |
StringView & | operator= (const char *p) |
StringView & | operator= (const StringView &fs) |
bool | operator== (const BufferString &) const |
bool | operator== (const char *s) const |
bool | operator== (const OD::String &s) const |
bool | operator== (const StringView &fs) const |
Public Member Functions inherited from OD::String | |
virtual | ~String () |
const char * | buf () const |
bool | contains (char) const |
bool | contains (const char *) const |
unsigned int | count (char) const |
bool | endsWith (const char *, CaseSensitivity c=CaseSensitive) const |
const char * | find (char) const |
const char * | find (const char *) const |
const char * | findLast (char) const |
const char * | findLast (const char *) const |
unsigned int | getLevenshteinDist (const char *, bool casesens) const |
bool | isEmpty () const |
bool | isEndOf (const char *, CaseSensitivity c=CaseSensitive) const |
bool | isEqual (const char *, CaseSensitivity c=CaseSensitive) const |
bool | isNumber (bool int_only=false) const |
bool | isStartOf (const char *, CaseSensitivity c=CaseSensitive) const |
bool | isYesNo () const |
virtual char | lastChar () const |
bool | matches (const char *, CaseSensitivity c=CaseSensitive) const |
operator const char * () const | |
bool | operator!= (const char *) const |
bool | operator!= (const String &) const |
template<class T > | |
bool | operator!= (const T &t) const |
bool | operator< (const char *) const |
bool | operator< (const String &) const |
template<class T > | |
bool | operator< (const T &) const |
bool | operator== (const char *) const |
bool | operator== (const String &) const |
template<class T > | |
bool | operator== (const T &) const |
bool | operator> (const char *) const |
bool | operator> (const String &) const |
template<class T > | |
bool | operator> (const T &) const |
const char & | operator[] (int idx) const |
unsigned int | size () const |
bool | startsWith (const char *, CaseSensitivity c=CaseSensitive) const |
const char * | str () const |
bool | toBool () const |
double | toDouble () const |
float | toFloat () const |
int | toInt () const |
std::uint64_t | toUInt64 () const |
Static Public Member Functions | |
static const StringView & | empty () |
Static Public Member Functions inherited from OD::String | |
static const String & | empty () |
Protected Member Functions | |
StringView (const OD::String &)=delete | |
const char * | gtBuf () const override |
const char * | gtStr () const override |
StringView & | operator= (const OD::String &)=delete |
Protected Member Functions inherited from OD::String | |
operator bool () const =delete | |
Protected Attributes | |
const char * | str_ |
OD::String that holds an existing text string.
The string is assumed to be owned by someone else or be static. In any case, it is assumed be be alive and well for the lifetime of the StringView.
The StringView is a light-weight, shallow adapter; it never changes the underlying string. It is comparable to std::string_view (C++17).
<>
|
inline |
|
protecteddelete |
|
static |
|
inlineoverridevirtual |
Reimplemented from OD::String.
|
inlineoverrideprotectedvirtual |
Implements OD::String.
|
inlineoverrideprotectedvirtual |
Implements OD::String.
|
inline |
|
inline |
|
inline |
|
inline |
bool StringView::operator!= | ( | const BufferString & | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
|
protecteddelete |
|
inline |
bool StringView::operator== | ( | const BufferString & | ) | const |
|
inline |
|
inline |
|
inline |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024