DCL 3.7.4
Loading...
Searching...
No Matches
__STRING.h
Go to the documentation of this file.
1#ifdef __DCL_INTERNAL__
2
3#undef _T
4#undef CHAR_T
5#undef UCHAR_T
6#undef BUFFER_T
7#undef STRING_T
8#undef ARRAY_T
9
10#ifdef __DCL_COMPILE_UNICODE__
11 #define _T(s) L ## s
12 #define CHAR_T wchar_t
13 #define UCHAR_T wint_t
14 #define BUFFER_T CharBuffer
15 #define STRING_T String
16 #define STRING_BUILDER_T StringBuilder
17 #define ARRAY_T StringArray
18#else
19 #define _T(s) s
20 #define CHAR_T char
21 #define UCHAR_T byte_t
22 #define BUFFER_T ByteBuffer
23 #define STRING_T ByteString
24 #define STRING_BUILDER_T ByteStringBuilder
25 #define ARRAY_T ByteStringArray
26#endif
27
28class ARRAY_T;
29
31{
32 volatile long __refCount;
35
36 CHAR_T* data() { return (CHAR_T*)(this + 1); }
37
38 long addRef();
39 long release();
40
41 static void destroy(BUFFER_T* _buf);
42
43 static BUFFER_T* create(size_t _len);
44 static BUFFER_T* create_e(size_t _len);
45
46 static void extend(BUFFER_T*& _buf, size_t _len);
47 static void shrink(BUFFER_T*& _buf);
48
49 static void write(BUFFER_T*& _buf, const CHAR_T* _str, size_t _len);
50 static void write(BUFFER_T*& _buf, CHAR_T _ch);
51 static int vformat(BUFFER_T*& _buf, const CHAR_T* _format, va_list _arglist);
52};
53
55{
56 friend class STRING_BUILDER_T;
57protected:
59 BUFFER_T* __buf() const { return (BUFFER_T*)__psz - 1; }
60
61 void assignAlloc(size_t _len);
62
63public:
64 ~STRING_T();
65 STRING_T();
66 STRING_T(const STRING_T& _str);
67 STRING_T(CHAR_T _ch, size_t _repeat = 1);
68 STRING_T(const CHAR_T* _ps, size_t _start, size_t _len);
69 STRING_T(const CHAR_T* _psz, size_t _len = (size_t)-1);
70 STRING_T(const CHAR_T* _begin, const CHAR_T* _end);
71 STRING_T(BUFFER_T* _buf);
72
73 STRING_T& assign(const STRING_T& _str);
74 STRING_T& assign(CHAR_T _ch, size_t _repeat = 1);
75 STRING_T& assign(const CHAR_T* _ps, size_t _start, size_t _len);
76 STRING_T& assign(const CHAR_T* _psz, size_t _len = (size_t)-1);
77 STRING_T& assign(const CHAR_T* _begin, const CHAR_T* _end);
78 STRING_T& assign(BUFFER_T* _buf);
79
80 STRING_T& operator = (const STRING_T& _str);
81 STRING_T& operator = (const CHAR_T* _psz);
82 STRING_T& operator = (CHAR_T _ch);
83 STRING_T& operator = (BUFFER_T* _buf);
84
85 void clear();
86
87protected:
88 void assign(const CHAR_T* _ps1, size_t _len1, const CHAR_T* _ps2, size_t _len2);
89
90 DCLCAPI friend STRING_T operator + (const STRING_T& _str1, const STRING_T& _str2);
91 DCLCAPI friend STRING_T operator + (const STRING_T& _str, CHAR_T _ch);
92 DCLCAPI friend STRING_T operator + (CHAR_T _ch, const STRING_T& _str);
93 DCLCAPI friend STRING_T operator + (const STRING_T& _str, const CHAR_T* _psz);
94 DCLCAPI friend STRING_T operator + (const CHAR_T* _psz, const STRING_T& _str);
95
96public:
97 // return (size_t)-1 not found
98 size_t indexOf(CHAR_T _ch, size_t _start = 0) const;
99 size_t indexOf(const CHAR_T* _psz, size_t _start = 0) const;
100 size_t indexOf(const STRING_T& _str, size_t _start = 0) const;
101 size_t lastIndexOf(CHAR_T _ch, size_t _start = 0) const;
102 size_t lastIndexOf(const STRING_T& _str, size_t _start = 0) const;
103 size_t lastIndexOf(const CHAR_T* _psz, size_t _start = 0) const;
104
105 bool contains(CHAR_T _ch) const;
106 bool contains(const CHAR_T* _psz) const;
107 bool contains(const STRING_T& _str) const;
108
109 bool endsWith(const CHAR_T* _suffix) const;
110 bool startsWith(const CHAR_T* _prefix) const;
111 bool endsWith(const STRING_T& _suffix) const;
112 bool startsWith(const STRING_T& _prefix) const;
113
114 int compare(const CHAR_T* _psz, size_t _len = (size_t)-1) const;
115 int compareNoCase(const CHAR_T* _psz, size_t _len = (size_t)-1) const;
116 static int compare(const CHAR_T* psz1, const CHAR_T* psz2, size_t _len = (size_t)-1);
117 static int compareNoCase(const CHAR_T* psz1, const CHAR_T* psz2, size_t _len = (size_t)-1);
118
119 STRING_T mid(size_t _first, size_t _len = (size_t)-1) const; // _len == -1 then 나머지 전부
120 STRING_T left(size_t _len) const;
121 STRING_T right(size_t _len) const;
122
123 STRING_T substring(size_t _first) const;
124 STRING_T substring(size_t _first, size_t _last) const;
125
126 STRING_T padCenter(size_t _len, CHAR_T _ch) const;
127 STRING_T padLeft(size_t _len, CHAR_T _ch) const;
128 STRING_T padRight(size_t _len, CHAR_T _ch) const;
129
130 STRING_T replace(size_t _start, size_t _len,
131 const CHAR_T* _new, size_t _newlen = (size_t)-1) const;
132 STRING_T replace(size_t _start, const STRING_T& _new) const;
133 STRING_T rreplace(size_t _start, size_t _len,
134 const CHAR_T* _new, size_t _newlen = (size_t)-1) const;
135 STRING_T rreplace(size_t _start, const STRING_T& _new) const;
136
137 STRING_T replace(CHAR_T _old, CHAR_T _new) const;
138 STRING_T replace(const CHAR_T* _old, const CHAR_T* _new) const;
139 STRING_T replace(const STRING_T& _old, const STRING_T& _new) const;
140 STRING_T replace(const CHAR_T* _old, size_t _oldlen,
141 const CHAR_T* _new, size_t _newlen) const;
142
143 size_t search(
144 const CHAR_T* _regex,
145 bool _icase
147
148 size_t search(
149 const STRING_T& _regex,
150 bool _icase
152
153 STRING_T substring(
154 const CHAR_T* _regex,
155 bool _icase
157
158 STRING_T substring(
159 const STRING_T& _regex,
160 bool _icase
162
163 bool searches(
164 const CHAR_T* _regex,
165 bool _icase
167
168 bool searches(
169 const STRING_T& _regex,
170 bool _icase
171 ) const
173
174 bool matches(
175 const CHAR_T* _regex,
176 bool _icase
178
179 bool matches(
180 const STRING_T& _regex,
181 bool _icase
183
184 STRING_T replace_r(
185 const CHAR_T* _regex,
186 const CHAR_T* _replacment,
187 bool _icase,
188 size_t _limit = (size_t)-1
190
191 STRING_T replace_r(
192 const STRING_T& _regex,
193 const STRING_T& _replacement,
194 bool _icase,
195 size_t _limit = (size_t)-1
197
198 ARRAY_T& split_r(
199 const CHAR_T* _regex,
200 bool _icase,
201 ARRAY_T& _results,
202 size_t _limit = (size_t)-1
204
205 ARRAY_T& split_r(
206 const STRING_T& _regex,
207 bool _icase ,
208 ARRAY_T& _results,
209 size_t _limit = (size_t)-1
211
212 STRING_T toUpperCase() const;
213 STRING_T toLowerCase() const;
214#ifdef __DCL_INCLUDED_LOCALE_H
215 STRING_T toUpperCase(locale_t _locale) const;
216 STRING_T toLowerCase(locale_t _locale) const;
217#endif
218 String toString() const;
219
220 STRING_T trim() const;
221 STRING_T trimLeft() const;
222 STRING_T trimRight() const;
223 STRING_T trim(const CHAR_T* _chars) const;
224 STRING_T trimLeft(const CHAR_T* _chars) const;
225 STRING_T trimRight(const CHAR_T* _chars) const;
226
227 bool isEmpty() const;
228 size_t length() const;
229 const CHAR_T* data() const;
230 operator const CHAR_T* () const;
231 CHAR_T operator[](size_t _index) const;
232
233 static size_t length(const CHAR_T* _psz, size_t _max = (size_t)-1);
234
235 static STRING_T format(const CHAR_T* _format, ...);
236
238 ESCAPE_DEFAULT, // ASCII_0 ~ ASCII_31, ASCII_127 ~ 256, " ' / \ ?
239 ESCAPE_EXTENDED, // exclusive 0~9 a~z A~Z
241 ESCAPE_XML // &<>"'
242 };
243
244 static STRING_T escape(
245 const CHAR_T* _ps,
246 size_t _len,
247 EscapeFlags _flag = ESCAPE_DEFAULT
248 );
249
250 static STRING_T unescape(
251 const CHAR_T* _psz,
252 size_t _len
253 );
254
255 static STRING_T toHexString( // "\x..."
256 const char* _bytes,
257 size_t _len,
258 size_t _max = (size_t)-1,
259 bool _prefix = true
260 );
261
262 static STRING_T toHexString(
263 const ByteString& _bytes,
264 size_t _max = (size_t)-1,
265 bool _prefix = true
266 );
267
268 static STRING_T tryString(
269 const char* _bytes,
270 size_t _len,
271 size_t _max = (size_t)-1
272 );
273
274 static STRING_T tryString(
275 const ByteString& _bytes,
276 size_t _max = (size_t)-1
277 );
278
279 static CHAR_T* find(
280 const CHAR_T* _begin,
281 const CHAR_T* _end,
282 CHAR_T _ch
283 );
284
285 static CHAR_T* rfind(
286 const CHAR_T* _begin,
287 const CHAR_T* _end,
288 CHAR_T _ch
289 );
290
291 // find '\0' included string
292 static CHAR_T* find(
293 const CHAR_T* _begin,
294 const CHAR_T* _end,
295 const CHAR_T* _sub,
296 size_t _sublen
297 );
298
299 static CHAR_T* rfind(
300 const CHAR_T* _begin,
301 const CHAR_T* _end,
302 const CHAR_T* _sub,
303 size_t _sublen
304 );
305
306 static size_t split(
307 const CHAR_T* _begin,
308 const CHAR_T* _end,
309 const CHAR_T* _delimiter,
310 size_t _delimiterlen,
311 ARRAY_T& _results,
312 size_t _limit = (size_t)-1
313 );
314
315 static size_t split(
316 const CHAR_T* _begin,
317 const CHAR_T* _end,
318 CHAR_T _delimiter,
319 ARRAY_T& _results,
320 size_t _limit = (size_t)-1
321 );
322
323 size_t split(
324 const STRING_T& _delimiter,
325 ARRAY_T& _results,
326 size_t _limit = (size_t)-1
327 ) const;
328
329 size_t split(
330 CHAR_T _delimiter,
331 ARRAY_T& _results,
332 size_t _limit = (size_t)-1
333 ) const;
334
335 static STRING_T join(
336 const ARRAY_T& _array,
337 CHAR_T _delimiter,
338 bool _hasEmpty = false
339 );
340
341 static STRING_T valueOf(bool _b);
342 static STRING_T valueOf(char _n);
343 static STRING_T valueOf(unsigned char _n);
344 static STRING_T valueOf(short _n);
345 static STRING_T valueOf(unsigned short _n);
346 static STRING_T valueOf(int _n);
347 static STRING_T valueOf(unsigned int _n);
348 static STRING_T valueOf(long _n);
349 static STRING_T valueOf(unsigned long _n);
350 static STRING_T valueOf(long long _n);
351 static STRING_T valueOf(unsigned long long _n);
352 static STRING_T valueOf(float _n);
353 static STRING_T valueOf(double _n);
354 static STRING_T valueOf(long double _n);
355};
356
357inline STRING_T& STRING_T::operator = (const STRING_T& _str)
358{
359 return assign(_str);
360}
361
362inline STRING_T& STRING_T::operator = (const CHAR_T* _psz)
363{
364 return assign(_psz, (size_t)-1);
365}
366
367inline STRING_T& STRING_T::operator = (CHAR_T _ch)
368{
369 return assign(&_ch, 1);
370}
371
372inline STRING_T& STRING_T::operator = (BUFFER_T* _buf)
373{
374 return assign(_buf);
375}
376
377inline int STRING_T::compare(const CHAR_T* _psz, size_t _len) const
378{
379 return STRING_T::compare(__psz, _psz, _len);
380}
381
382inline int STRING_T::compareNoCase(const CHAR_T* _psz, size_t _len) const
383{
384 return STRING_T::compareNoCase(__psz, _psz, _len);
385}
386// ==
387DCLCAPI inline bool operator == (const STRING_T& _str1, const STRING_T& _str2)
388{
389 return _str1.length() == _str2.length() ? _str1.compare(_str2) == 0 : false;
390}
391
392DCLCAPI inline bool operator == (const STRING_T& _str1, const CHAR_T* _psz)
393{
394 return _str1.compare(_psz) == 0;
395}
396
397DCLCAPI inline bool operator == (const CHAR_T* _psz, const STRING_T& _str2)
398{
399 return _str2.compare(_psz) == 0;
400}
401
402DCLCAPI inline bool operator == (const STRING_T& _str1, CHAR_T _ch)
403{
404 CHAR_T sz[2] = { _ch, 0 };
405 return _str1.compare(sz) == 0;
406}
407
408DCLCAPI inline bool operator == (CHAR_T _ch, const STRING_T& _str2)
409{
410 CHAR_T sz[2] = { _ch, 0 };
411 return _str2.compare(sz) == 0;
412}
413// !=
414DCLCAPI inline bool operator != (const STRING_T& _str1, const STRING_T& _str2)
415{
416 return _str1.length() == _str2.length() ? _str1.compare(_str2) != 0 : true;
417}
418
419DCLCAPI inline bool operator != (const STRING_T& _str, const CHAR_T* _psz)
420{
421 return _str.compare(_psz) != 0;
422}
423
424DCLCAPI inline bool operator != (const CHAR_T* _psz, const STRING_T& _str2)
425{
426 return _str2.compare(_psz) != 0;
427}
428
429DCLCAPI inline bool operator != (const STRING_T& _str1, CHAR_T _ch)
430{
431 CHAR_T sz[2] = { _ch, 0 };
432 return _str1.compare(sz) != 0;
433}
434
435DCLCAPI inline bool operator != (CHAR_T _ch, const STRING_T& _str2)
436{
437 CHAR_T sz[2] = { _ch, 0 };
438 return _str2.compare(sz) != 0;
439}
440// >
441DCLCAPI inline bool operator > (const STRING_T& _str1, const STRING_T& _str2)
442{
443 ssize_t n = _str1.length() - _str2.length();
444 return n == 0 ? _str1.compare(_str2) > 0 : n > 0;
445}
446
447DCLCAPI inline bool operator > (const STRING_T& _str1, const CHAR_T* _psz)
448{
449 return _str1.compare(_psz) > 0;
450}
451
452DCLCAPI inline bool operator > (const CHAR_T* _psz, const STRING_T& _str2)
453{
454 return _str2.compare(_psz) < 0;
455}
456
457DCLCAPI inline bool operator > (const STRING_T& _str1, CHAR_T _ch)
458{
459 CHAR_T sz[2] = { _ch, 0 };
460 return _str1.compare(sz) > 0;
461}
462
463DCLCAPI inline bool operator > (CHAR_T _ch, const STRING_T& _str2)
464{
465 CHAR_T sz[2] = { _ch, 0 };
466 return _str2.compare(sz) < 0;
467}
468// <
469DCLCAPI inline bool operator < (const STRING_T& _str1, const STRING_T& _str2)
470{
471 ssize_t n = _str1.length() - _str2.length();
472 return n == 0 ? _str1.compare(_str2) < 0 : n < 0;
473}
474
475DCLCAPI inline bool operator < (const STRING_T& _str1, const CHAR_T* _psz)
476{
477 return _str1.compare(_psz) < 0;
478}
479
480DCLCAPI inline bool operator < (const CHAR_T* _psz, const STRING_T& _str2)
481{
482 return _str2.compare(_psz) > 0;
483}
484
485DCLCAPI inline bool operator < (const STRING_T& _str1, CHAR_T _ch)
486{
487 CHAR_T sz[2] = { _ch, 0 };
488 return _str1.compare(sz) < 0;
489}
490
491DCLCAPI inline bool operator < (CHAR_T _ch, const STRING_T& _str2)
492{
493 CHAR_T sz[2] = { _ch, 0 };
494 return _str2.compare(sz) > 0;
495}
496// >=
497DCLCAPI inline bool operator >= (const STRING_T& _str1, const STRING_T& _str2)
498{
499 return _str1.compare(_str2) >= 0;
500}
501
502DCLCAPI inline bool operator >= (const STRING_T& _str1, const CHAR_T* _psz)
503{
504 return _str1.compare(_psz) >= 0;
505}
506
507DCLCAPI inline bool operator >= (const CHAR_T* _psz, const STRING_T& _str2)
508{
509 return _str2.compare(_psz) <= 0;
510}
511
512DCLCAPI inline bool operator >= (const STRING_T& _str1, CHAR_T _ch)
513{
514 CHAR_T sz[2] = { _ch, 0 };
515 return _str1.compare(sz) >= 0;
516}
517
518DCLCAPI inline bool operator >= (CHAR_T _ch, const STRING_T& _str2)
519{
520 CHAR_T sz[2] = { _ch, 0};
521 return _str2.compare(sz) <= 0;
522}
523// <=
524DCLCAPI inline bool operator <= (const STRING_T& _str1, const STRING_T& _str2)
525{
526 return _str1.compare(_str2) <= 0;
527}
528
529DCLCAPI inline bool operator <= (const STRING_T& _str1, const CHAR_T* _psz)
530{
531 return _str1.compare(_psz) <= 0;
532}
533
534DCLCAPI inline bool operator <= (const CHAR_T* _psz, const STRING_T& _str2)
535{
536 return _str2.compare(_psz) >= 0;
537}
538
539DCLCAPI inline bool operator <= (const STRING_T& _str1, CHAR_T _ch)
540{
541 CHAR_T sz[2] = { _ch, 0 };
542 return _str1.compare(sz) <= 0;
543}
544
545DCLCAPI inline bool operator <= (CHAR_T _ch, const STRING_T& _str2)
546{
547 CHAR_T sz[2] = { _ch, 0 };
548 return _str2.compare(sz) >= 0;
549}
550
551inline bool STRING_T::contains(CHAR_T _ch) const
552{
553 return indexOf(_ch, 0) != (size_t)-1;
554}
555
556inline bool STRING_T::contains(const CHAR_T* _psz) const
557{
558 return indexOf(_psz, 0) != (size_t)-1;
559}
560
561inline bool STRING_T::contains(const STRING_T& _str) const
562{
563 return indexOf(_str, 0) != (size_t)-1;
564}
565
566inline bool STRING_T::endsWith(const CHAR_T* _suffix) const
567{
568 size_t len = STRING_T::length(_suffix);
569 return length() >= len &&
571 _suffix, len) == 0;
572}
573
574inline bool STRING_T::startsWith(const CHAR_T* _prefix) const {
575 return STRING_T::compare(__psz, _prefix, STRING_T::length(_prefix)) == 0;
576}
577
578inline bool STRING_T::endsWith(const STRING_T& _suffix) const
579{
580 return length() >= _suffix.length() &&
581 STRING_T::compare(__psz + length() - _suffix.length(),
582 _suffix.__psz, _suffix.length()) == 0;
583}
584
585inline bool STRING_T::startsWith(const STRING_T& _prefix) const
586{
587 return STRING_T::compare(__psz, _prefix.__psz, _prefix.length()) == 0;
588}
589
590inline STRING_T STRING_T::substring(size_t _first) const
591{
592 return mid(_first);
593}
594
595inline STRING_T STRING_T::substring(size_t _first, size_t _last) const
596{
597 return mid(_first, _last - _first);
598}
599
600inline STRING_T STRING_T::replace(size_t _start, const STRING_T& _new) const
601{
602 return replace(_start, _new.length(), _new, _new.length());
603}
604
605inline STRING_T STRING_T::rreplace(size_t _start, const STRING_T& _new) const
606{
607 return rreplace(_start, _new.length(), _new, _new.length());
608}
609
610inline STRING_T STRING_T::replace(const CHAR_T* _old, const CHAR_T* _new) const
611{
612 return replace(_old, STRING_T::length(_old),
613 _new, STRING_T::length(_new));
614}
615
616inline STRING_T STRING_T::replace(const STRING_T& _old, const STRING_T& _new) const
617{
618 return replace(_old, _old.length(), _new, _new.length());
619}
620
621inline bool STRING_T::isEmpty() const
622{
623 return length() == 0;
624}
625
626inline size_t STRING_T::length() const
627{
628 return __buf()->__dataLength;
629}
630
631inline const CHAR_T* STRING_T::data() const
632{
633 return __psz;
634}
635
636inline STRING_T::operator const CHAR_T* () const
637{
638 return __psz;
639}
640
642 const ByteString& _bytes,
643 size_t _max, // = (size_t)-1,
644 bool _prefix // = true
645)
646{
647 return STRING_T::toHexString(_bytes, _bytes.length(), _max, _prefix);
648}
649
651 const ByteString& _bytes,
652 size_t _max // = (size_t)-1,
653)
654{
655 return STRING_T::tryString(_bytes, _bytes.length(), _max);
656}
657
658inline size_t STRING_T::split(
659 const STRING_T& _delimiter,
660 ARRAY_T& _results,
661 size_t _limit // = (size_t)-1
662) const
663{
664 return STRING_T::split(
665 __psz, __psz + length(),
666 _delimiter.__psz, _delimiter.length(),
667 _results,
668 _limit
669 );
670}
671
672inline size_t STRING_T::split(
673 CHAR_T _delimiter,
674 ARRAY_T& _results,
675 size_t _limit // = (size_t)-1
676) const
677{
678 return STRING_T::split(
679 __psz, __psz + length(),
680 _delimiter,
681 _results,
682 _limit
683 );
684}
685
686#undef _T
687#undef CHAR_T
688#undef UCHAR_T
689#undef BUFFER_T
690#undef STRING_T
691#undef STRING_BUILDER_T
692#undef ARRAY_T
693
694#endif // __DCL_INTERNAL_
DCLCAPI bool operator!=(const STRING_T &_str1, const STRING_T &_str2)
Definition __STRING.h:414
#define STRING_T
Definition __STRING.h:23
#define BUFFER_T
Definition __STRING.h:22
DCLCAPI bool operator>=(const STRING_T &_str1, const STRING_T &_str2)
Definition __STRING.h:497
#define CHAR_T
Definition __STRING.h:20
#define ARRAY_T
Definition __STRING.h:25
DCLCAPI bool operator==(const STRING_T &_str1, const STRING_T &_str2)
Definition __STRING.h:387
DCLCAPI bool operator<(const STRING_T &_str1, const STRING_T &_str2)
Definition __STRING.h:469
DCLCAPI bool operator>(const STRING_T &_str1, const STRING_T &_str2)
Definition __STRING.h:441
DCLCAPI bool operator<=(const STRING_T &_str1, const STRING_T &_str2)
Definition __STRING.h:524
#define DCLCAPI
Definition Config.h:95
#define __DCL_THROWS1(e)
Definition Config.h:152
DCLCAPI Date operator+(const Date &_date, long _days)
Definition DateTime.cpp:177
int compare(const CHAR_T *_psz, size_t _len=(size_t) -1) const
Definition __STRING.h:377
bool isEmpty() const
Definition __STRING.h:621
static size_t split(const CHAR_T *_begin, const CHAR_T *_end, const CHAR_T *_delimiter, size_t _delimiterlen, ARRAY_T &_results, size_t _limit=(size_t) -1)
bool startsWith(const CHAR_T *_prefix) const
Definition __STRING.h:574
const CHAR_T * data() const
Definition __STRING.h:631
static STRING_T toHexString(const char *_bytes, size_t _len, size_t _max=(size_t) -1, bool _prefix=true)
static STRING_T tryString(const char *_bytes, size_t _len, size_t _max=(size_t) -1)
@ ESCAPE_DEFAULT
Definition __STRING.h:238
@ ESCAPE_XML
Definition __STRING.h:241
@ ESCAPE_ALL
Definition __STRING.h:240
@ ESCAPE_EXTENDED
Definition __STRING.h:239
STRING_T mid(size_t _first, size_t _len=(size_t) -1) const
Definition __STRING.cpp:617
bool endsWith(const CHAR_T *_suffix) const
Definition __STRING.h:566
friend class STRING_BUILDER_T
Definition __STRING.h:56
STRING_T replace(size_t _start, size_t _len, const CHAR_T *_new, size_t _newlen=(size_t) -1) const
Definition __STRING.cpp:736
size_t length() const
Definition __STRING.h:626
bool contains(CHAR_T _ch) const
Definition __STRING.h:551
int compareNoCase(const CHAR_T *_psz, size_t _len=(size_t) -1) const
Definition __STRING.h:382
size_t indexOf(CHAR_T _ch, size_t _start=0) const
Definition __STRING.cpp:521
CHAR_T * __psz
Definition __STRING.h:58
STRING_T & assign(const STRING_T &_str)
Definition __STRING.cpp:387
BUFFER_T * __buf() const
Definition __STRING.h:59
STRING_T substring(size_t _first) const
Definition __STRING.h:590
STRING_T rreplace(size_t _start, size_t _len, const CHAR_T *_new, size_t _newlen=(size_t) -1) const
Definition __STRING.cpp:765
size_t __allocLength
Definition __STRING.h:33
CHAR_T * data()
Definition __STRING.h:36
volatile long __refCount
Definition __STRING.h:32
size_t __dataLength
Definition __STRING.h:34