39 #define UNIDOUBLER_HEADER "CStr.h"
47 #if defined(IN_UNIDOUBLER) && ( (defined(_UNICODE) && !defined(CSTR_H_U)) || (!defined(_UNICODE) && !defined(CSTR_H_A)) )
64 class CStr:
public std::tstring
71 CStr(
const tchar* String) : std::tstring(String) {}
72 CStr(
const tchar* String,
size_t Length) : std::tstring(String, Length) {}
73 CStr(
const std::tstring& String) : std::tstring(String) {}
82 static CStr Repeat(
const CStr& String,
size_t Reps);
89 explicit CStr(
const utf16string& String) : std::tstring(String.begin(), String.end()) {}
97 CStrW FromUTF8()
const;
102 static CStr FromInt(
int n);
103 static CStr FromUInt(
unsigned int n);
104 static CStr FromInt64(
i64 n);
105 static CStr FromDouble(
double n);
120 unsigned int ToUInt()
const;
134 unsigned long ToULong()
const;
141 float ToFloat()
const;
148 double ToDouble()
const;
158 long Find(
const CStr& Str)
const;
167 long Find(
const tchar chr)
const;
177 long Find(
const int start,
const tchar chr)
const;
187 long FindInsensitive(
const CStr& Str)
const;
196 long FindInsensitive(
const tchar chr)
const;
206 long FindInsensitive(
const int start,
const tchar chr)
const;
216 long ReverseFind(
const CStr& Str)
const;
223 CStr LowerCase()
const;
229 CStr UpperCase()
const;
237 CStr Left(
size_t len)
const;
245 CStr Right(
size_t len)
const;
256 CStr AfterLast(
const CStr& Str,
size_t startPos = npos)
const;
267 CStr BeforeLast(
const CStr& Str,
size_t startPos = npos)
const;
278 CStr AfterFirst(
const CStr& Str,
size_t startPos = 0)
const;
289 CStr BeforeFirst(
const CStr& Str,
size_t startPos = 0)
const;
296 void Remove(
const CStr& Str);
304 void Replace(
const CStr& StrToReplace,
const CStr& ReplaceWith);
311 CStr UnescapeBackslashes()
const;
316 std::string EscapeToPrintableASCII()
const;
339 size_t GetHashCode()
const;
344 size_t GetSerializedLength()
const;
345 u8* Serialize(
u8* buffer)
const;
346 const u8* Deserialize(
const u8* buffer,
const u8* bufferend);
349 static inline size_t hash_value(
const CStr& s)
351 return s.GetHashCode();
Trim all white space from the beginning of the string.
size_t hash_value(const CStrIntern &v)
Trim all white space from the end of the string.
std::basic_string< utf16_t, utf16_traits > utf16string
static float Length(const SVec3 v)
PS_TRIM_MODE
File : CStr.h Project : engine Description : Contains CStr class which is a versatile class for makin...