16 #if _MSC_VER >= 1920 //VC16 2019
20 #if __has_include(<compare>)
22 # if defined(__cpp_lib_three_way_comparison) && __cpp_lib_three_way_comparison >= 201907
23 # define DtSPACESHIP_OPERATOR_IS_SUPPORTED 1
27 #ifdef DtUSE_UTILITIES_NAMESPACE
28 namespace DtUSE_UTILITIES_NAMESPACE
47 DtString(
const char* str,
int length );
77 virtual DtString& operator = (
const char* orig );
84 [[deprecated(
"Use c_str() instead.")]]
virtual operator const char*()
const;
99 virtual bool operator < (
const char* str )
const;
100 virtual bool operator > (
const char* str )
const;
101 virtual bool operator == (
const char* str )
const;
102 virtual bool operator != (
const char* str )
const;
103 virtual bool operator <= (
const char* str )
const;
104 virtual bool operator >= (
const char* str )
const;
106 #if DtSPACESHIP_OPERATOR_IS_SUPPORTED
111 if (s1 == s2)
return std::strong_ordering::equal;
112 if (s1 < s2)
return std::strong_ordering::less;
113 return std::strong_ordering::greater;
123 virtual bool caseCompare(
const char* str)
const;
124 virtual bool caseCompare(
const DtString& str)
const;
135 virtual DtString& operator += (
const char* str );
143 virtual char& operator [] (
int index );
144 virtual const char& operator [] (
int index )
const;
155 virtual bool snipFront(
const char ch,
bool toLastCh =
false );
156 virtual bool snipBack(
const char ch,
bool fromFirstCh =
false );
161 virtual bool chompFront();
162 virtual bool chompBack();
167 virtual void tokenize(
const char delimiter, std::vector<DtString>& tokens )
const;
172 virtual int toInt(
bool* ok = 0 )
const;
177 virtual unsigned int toUInt(
bool* ok = 0 )
const;
182 virtual float toFloat(
bool* ok = 0 )
const;
187 virtual double toDouble(
bool* ok = 0 )
const;
192 virtual bool toBoolean(
bool* ok = 0 )
const;
195 virtual void toUpper();
198 virtual void toLower();
203 virtual int findChar(
const char ch );
208 virtual int findLastChar(
const char ch );
213 virtual int findString(
const DtString&
string )
const;
218 virtual int findLastString(
const DtString&
string );
222 return snipFront( ch,
true );
227 return snipBack( ch,
true );
231 virtual int count(
const char ch )
const;
235 virtual int length()
const;
238 virtual int size()
const;
241 virtual std::string stdString()
const;
245 virtual const char* string()
const;
248 virtual const char* c_str()
const;
251 virtual bool isEmpty()
const;
255 virtual DtString section(
const char sep,
int start,
int end = -1)
const;
260 static const DtString& nullString();
279 void setString(
const char* str );
285 theDefaultBufferSize = 64
288 char myDefaultBuffer[theDefaultBufferSize];
290 bool myStringAlloced;
301 return (myString[0] ==
'\0');
304 #ifdef DtUSE_UTILITIES_NAMESPACE
const bool operator==(const DtU128 &lhs, const DtU128 &rhs)
virtual bool isEmpty() const
returns true if the string is empty, where empty is size() == 0
Definition: vlString.h:299
bool snipFrontToLast(const char ch)
Definition: vlString.h:220
DtVector operator+(const DtVector &v1, const DtVector &v2)
implements v1 + v2
std::ostream & operator<<(std::ostream &os, const Dt3dChord &chord)
std::istream & operator>>(std::istream &is, Dt3dExtent &extent)
bool snipBackToFirst(const char ch)
Definition: vlString.h:225
char * myString
Use this buffer if possible.
Definition: vlString.h:289
unsigned int myBufSize
Does myString need to be deleted when done?
Definition: vlString.h:292
const bool operator!=(const DtU128 &lhs, const DtU128 &rhs)
Instances of DtString are used to represent strings.
Definition: vlString.h:36
const bool operator<(const DtU128 &lhs, const DtU128 &rhs)
This file contains typedefs for machine dependant types.
const bool operator>(const DtU128 &lhs, const DtU128 &rhs)
static const int theMaxInsertionStringSize
current buffer size
Definition: vlString.h:294
#define DT_DLL_VLUTIL
Definition: vlMachineTypes.h:109