DCL 4.0
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
146 ) const
148
149 size_t search(
150 const STRING_T& _regex,
151 bool _icase
152 ) const
154
155 STRING_T substring(
156 const CHAR_T* _regex,
157 bool _icase
158 ) const
160
161 STRING_T substring(
162 const STRING_T& _regex,
163 bool _icase
164 ) const
166
167 bool searches(
168 const CHAR_T* _regex,
169 bool _icase
170 ) const
172
173 bool searches(
174 const STRING_T& _regex,
175 bool _icase
176 ) const
178
179 bool matches(
180 const CHAR_T* _regex,
181 bool _icase
182 ) const
184
185 bool matches(
186 const STRING_T& _regex,
187 bool _icase
188 ) const
190
191 STRING_T replace_r(
192 const CHAR_T* _regex,
193 const CHAR_T* _replacment,
194 bool _icase,
195 size_t _limit = (size_t)-1
196 ) const
198
199 STRING_T replace_r(
200 const STRING_T& _regex,
201 const STRING_T& _replacement,
202 bool _icase,
203 size_t _limit = (size_t)-1
204 ) const
206
207 ARRAY_T& split_r(
208 const CHAR_T* _regex,
209 bool _icase,
210 ARRAY_T& _results,
211 size_t _limit = (size_t)-1
212 ) const
214
215 ARRAY_T& split_r(
216 const STRING_T& _regex,
217 bool _icase ,
218 ARRAY_T& _results,
219 size_t _limit = (size_t)-1) const
221
222 STRING_T toUpperCase() const;
223 STRING_T toLowerCase() const;
224#ifdef __DCL_INCLUDED_LOCALE_H
225 STRING_T toUpperCase(locale_t _locale) const;
226 STRING_T toLowerCase(locale_t _locale) const;
227#endif
228 String toString() const;
229
230 STRING_T trim() const;
231 STRING_T trimLeft() const;
232 STRING_T trimRight() const;
233 STRING_T trim(const CHAR_T* _chars) const;
234 STRING_T trimLeft(const CHAR_T* _chars) const;
235 STRING_T trimRight(const CHAR_T* _chars) const;
236
237 bool isEmpty() const;
238 size_t length() const;
239 const CHAR_T* data() const;
240 operator const CHAR_T* () const;
241 CHAR_T operator[](size_t _index) const;
242
243 static size_t length(const CHAR_T* _psz, size_t _max = (size_t)-1);
244
245 static STRING_T format(const CHAR_T* _format, ...);
246
248 ESCAPE_DEFAULT, // ASCII_0 ~ ASCII_31, ASCII_127 ~ 256, " ' / \ ?
249 ESCAPE_EXTENDED, // exclusive 0~9 a~z A~Z
251 ESCAPE_XML // &<>"'
252 };
253
254 static STRING_T escape(
255 const CHAR_T* _ps,
256 size_t _len,
257 EscapeFlags _flag = ESCAPE_DEFAULT
258 );
259
260 static STRING_T unescape(
261 const CHAR_T* _psz,
262 size_t _len
263 );
264
265 static STRING_T toHexString( // "\x..."
266 const char* _bytes,
267 size_t _len,
268 size_t _max = (size_t)-1,
269 bool _prefix = true
270 );
271
272 static STRING_T toHexString(
273 const ByteString& _bytes,
274 size_t _max = (size_t)-1,
275 bool _prefix = true
276 );
277
278 static STRING_T tryString(
279 const char* _bytes,
280 size_t _len,
281 size_t _max = (size_t)-1
282 );
283
284 static STRING_T tryString(
285 const ByteString& _bytes,
286 size_t _max = (size_t)-1
287 );
288
289 static CHAR_T* find(
290 const CHAR_T* _begin,
291 const CHAR_T* _end,
292 CHAR_T _ch
293 );
294
295 static CHAR_T* rfind(
296 const CHAR_T* _begin,
297 const CHAR_T* _end,
298 CHAR_T _ch
299 );
300
301 // find '\0' included string
302 static CHAR_T* find(
303 const CHAR_T* _begin,
304 const CHAR_T* _end,
305 const CHAR_T* _sub,
306 size_t _sublen
307 );
308
309 static CHAR_T* rfind(
310 const CHAR_T* _begin,
311 const CHAR_T* _end,
312 const CHAR_T* _sub,
313 size_t _sublen
314 );
315
316 static size_t split(
317 const CHAR_T* _begin,
318 const CHAR_T* _end,
319 const CHAR_T* _delimiter,
320 size_t _delimiterlen,
321 ARRAY_T& _results,
322 size_t _limit = (size_t)-1
323 );
324
325 static size_t split(
326 const CHAR_T* _begin,
327 const CHAR_T* _end,
328 CHAR_T _delimiter,
329 ARRAY_T& _results,
330 size_t _limit = (size_t)-1
331 );
332
333 size_t split(
334 const STRING_T& _delimiter,
335 ARRAY_T& _results,
336 size_t _limit = (size_t)-1
337 ) const;
338
339 size_t split(
340 CHAR_T _delimiter,
341 ARRAY_T& _results,
342 size_t _limit = (size_t)-1
343 ) const;
344
345 static STRING_T join(
346 const ARRAY_T& _array,
347 CHAR_T _delimiter,
348 bool _hasEmpty = false
349 );
350
351 static STRING_T valueOf(bool _b);
352 static STRING_T valueOf(char _n);
353 static STRING_T valueOf(unsigned char _n);
354 static STRING_T valueOf(short _n);
355 static STRING_T valueOf(unsigned short _n);
356 static STRING_T valueOf(int _n);
357 static STRING_T valueOf(unsigned int _n);
358 static STRING_T valueOf(long _n);
359 static STRING_T valueOf(unsigned long _n);
360 static STRING_T valueOf(long long _n);
361 static STRING_T valueOf(unsigned long long _n);
362 static STRING_T valueOf(float _n);
363 static STRING_T valueOf(double _n);
364 static STRING_T valueOf(long double _n);
365};
366
367inline STRING_T& STRING_T::operator = (const STRING_T& _str)
368{
369 return assign(_str);
370}
371
372inline STRING_T& STRING_T::operator = (const CHAR_T* _psz)
373{
374 return assign(_psz, (size_t)-1);
375}
376
377inline STRING_T& STRING_T::operator = (CHAR_T _ch)
378{
379 return assign(&_ch, 1);
380}
381
382inline STRING_T& STRING_T::operator = (BUFFER_T* _buf)
383{
384 return assign(_buf);
385}
386
387inline int STRING_T::compare(const CHAR_T* _psz, size_t _len) const
388{
389 return STRING_T::compare(__psz, _psz, _len);
390}
391
392inline int STRING_T::compareNoCase(const CHAR_T* _psz, size_t _len) const
393{
394 return STRING_T::compareNoCase(__psz, _psz, _len);
395}
396// ==
397DCLCAPI inline bool operator == (const STRING_T& _str1, const STRING_T& _str2)
398{
399 return _str1.length() == _str2.length() ? _str1.compare(_str2) == 0 : false;
400}
401
402DCLCAPI inline bool operator == (const STRING_T& _str1, const CHAR_T* _psz)
403{
404 return _str1.compare(_psz) == 0;
405}
406
407DCLCAPI inline bool operator == (const CHAR_T* _psz, const STRING_T& _str2)
408{
409 return _str2.compare(_psz) == 0;
410}
411
412DCLCAPI inline bool operator == (const STRING_T& _str1, CHAR_T _ch)
413{
414 CHAR_T sz[2] = { _ch, 0 };
415 return _str1.compare(sz) == 0;
416}
417
418DCLCAPI inline bool operator == (CHAR_T _ch, const STRING_T& _str2)
419{
420 CHAR_T sz[2] = { _ch, 0 };
421 return _str2.compare(sz) == 0;
422}
423// !=
424DCLCAPI inline bool operator != (const STRING_T& _str1, const STRING_T& _str2)
425{
426 return _str1.length() == _str2.length() ? _str1.compare(_str2) != 0 : true;
427}
428
429DCLCAPI inline bool operator != (const STRING_T& _str, const CHAR_T* _psz)
430{
431 return _str.compare(_psz) != 0;
432}
433
434DCLCAPI inline bool operator != (const CHAR_T* _psz, const STRING_T& _str2)
435{
436 return _str2.compare(_psz) != 0;
437}
438
439DCLCAPI inline bool operator != (const STRING_T& _str1, CHAR_T _ch)
440{
441 CHAR_T sz[2] = { _ch, 0 };
442 return _str1.compare(sz) != 0;
443}
444
445DCLCAPI inline bool operator != (CHAR_T _ch, const STRING_T& _str2)
446{
447 CHAR_T sz[2] = { _ch, 0 };
448 return _str2.compare(sz) != 0;
449}
450// >
451DCLCAPI inline bool operator > (const STRING_T& _str1, const STRING_T& _str2)
452{
453 ssize_t n = _str1.length() - _str2.length();
454 return n == 0 ? _str1.compare(_str2) > 0 : n > 0;
455}
456
457DCLCAPI inline bool operator > (const STRING_T& _str1, const CHAR_T* _psz)
458{
459 return _str1.compare(_psz) > 0;
460}
461
462DCLCAPI inline bool operator > (const CHAR_T* _psz, const STRING_T& _str2)
463{
464 return _str2.compare(_psz) < 0;
465}
466
467DCLCAPI inline bool operator > (const STRING_T& _str1, CHAR_T _ch)
468{
469 CHAR_T sz[2] = { _ch, 0 };
470 return _str1.compare(sz) > 0;
471}
472
473DCLCAPI inline bool operator > (CHAR_T _ch, const STRING_T& _str2)
474{
475 CHAR_T sz[2] = { _ch, 0 };
476 return _str2.compare(sz) < 0;
477}
478// <
479DCLCAPI inline bool operator < (const STRING_T& _str1, const STRING_T& _str2)
480{
481 ssize_t n = _str1.length() - _str2.length();
482 return n == 0 ? _str1.compare(_str2) < 0 : n < 0;
483}
484
485DCLCAPI inline bool operator < (const STRING_T& _str1, const CHAR_T* _psz)
486{
487 return _str1.compare(_psz) < 0;
488}
489
490DCLCAPI inline bool operator < (const CHAR_T* _psz, const STRING_T& _str2)
491{
492 return _str2.compare(_psz) > 0;
493}
494
495DCLCAPI inline bool operator < (const STRING_T& _str1, CHAR_T _ch)
496{
497 CHAR_T sz[2] = { _ch, 0 };
498 return _str1.compare(sz) < 0;
499}
500
501DCLCAPI inline bool operator < (CHAR_T _ch, const STRING_T& _str2)
502{
503 CHAR_T sz[2] = { _ch, 0 };
504 return _str2.compare(sz) > 0;
505}
506// >=
507DCLCAPI inline bool operator >= (const STRING_T& _str1, const STRING_T& _str2)
508{
509 return _str1.compare(_str2) >= 0;
510}
511
512DCLCAPI inline bool operator >= (const STRING_T& _str1, const CHAR_T* _psz)
513{
514 return _str1.compare(_psz) >= 0;
515}
516
517DCLCAPI inline bool operator >= (const CHAR_T* _psz, const STRING_T& _str2)
518{
519 return _str2.compare(_psz) <= 0;
520}
521
522DCLCAPI inline bool operator >= (const STRING_T& _str1, CHAR_T _ch)
523{
524 CHAR_T sz[2] = { _ch, 0 };
525 return _str1.compare(sz) >= 0;
526}
527
528DCLCAPI inline bool operator >= (CHAR_T _ch, const STRING_T& _str2)
529{
530 CHAR_T sz[2] = { _ch, 0};
531 return _str2.compare(sz) <= 0;
532}
533// <=
534DCLCAPI inline bool operator <= (const STRING_T& _str1, const STRING_T& _str2)
535{
536 return _str1.compare(_str2) <= 0;
537}
538
539DCLCAPI inline bool operator <= (const STRING_T& _str1, const CHAR_T* _psz)
540{
541 return _str1.compare(_psz) <= 0;
542}
543
544DCLCAPI inline bool operator <= (const CHAR_T* _psz, const STRING_T& _str2)
545{
546 return _str2.compare(_psz) >= 0;
547}
548
549DCLCAPI inline bool operator <= (const STRING_T& _str1, CHAR_T _ch)
550{
551 CHAR_T sz[2] = { _ch, 0 };
552 return _str1.compare(sz) <= 0;
553}
554
555DCLCAPI inline bool operator <= (CHAR_T _ch, const STRING_T& _str2)
556{
557 CHAR_T sz[2] = { _ch, 0 };
558 return _str2.compare(sz) >= 0;
559}
560
561inline bool STRING_T::contains(CHAR_T _ch) const
562{
563 return indexOf(_ch, 0) != (size_t)-1;
564}
565
566inline bool STRING_T::contains(const CHAR_T* _psz) const
567{
568 return indexOf(_psz, 0) != (size_t)-1;
569}
570
571inline bool STRING_T::contains(const STRING_T& _str) const
572{
573 return indexOf(_str, 0) != (size_t)-1;
574}
575
576inline bool STRING_T::endsWith(const CHAR_T* _suffix) const
577{
578 size_t len = STRING_T::length(_suffix);
579 return length() >= len &&
581 _suffix, len) == 0;
582}
583
584inline bool STRING_T::startsWith(const CHAR_T* _prefix) const {
585 return STRING_T::compare(__psz, _prefix, STRING_T::length(_prefix)) == 0;
586}
587
588inline bool STRING_T::endsWith(const STRING_T& _suffix) const
589{
590 return length() >= _suffix.length() &&
591 STRING_T::compare(__psz + length() - _suffix.length(),
592 _suffix.__psz, _suffix.length()) == 0;
593}
594
595inline bool STRING_T::startsWith(const STRING_T& _prefix) const
596{
597 return STRING_T::compare(__psz, _prefix.__psz, _prefix.length()) == 0;
598}
599
600inline STRING_T STRING_T::substring(size_t _first) const
601{
602 return mid(_first);
603}
604
605inline STRING_T STRING_T::substring(size_t _first, size_t _last) const
606{
607 return mid(_first, _last - _first);
608}
609
610inline STRING_T STRING_T::replace(size_t _start, const STRING_T& _new) const
611{
612 return replace(_start, _new.length(), _new, _new.length());
613}
614
615inline STRING_T STRING_T::rreplace(size_t _start, const STRING_T& _new) const
616{
617 return rreplace(_start, _new.length(), _new, _new.length());
618}
619
620inline STRING_T STRING_T::replace(const CHAR_T* _old, const CHAR_T* _new) const
621{
622 return replace(_old, STRING_T::length(_old),
623 _new, STRING_T::length(_new));
624}
625
626inline STRING_T STRING_T::replace(const STRING_T& _old, const STRING_T& _new) const
627{
628 return replace(_old, _old.length(), _new, _new.length());
629}
630
631inline bool STRING_T::isEmpty() const
632{
633 return length() == 0;
634}
635
636inline size_t STRING_T::length() const
637{
638 return __buf()->__dataLength;
639}
640
641inline const CHAR_T* STRING_T::data() const
642{
643 return __psz;
644}
645
646inline STRING_T::operator const CHAR_T* () const
647{
648 return __psz;
649}
650
652 const ByteString& _bytes,
653 size_t _max, // = (size_t)-1,
654 bool _prefix // = true
655 )
656{
657 return STRING_T::toHexString(_bytes, _bytes.length(), _max, _prefix);
658}
659
661 const ByteString& _bytes,
662 size_t _max // = (size_t)-1,
663 )
664{
665 return STRING_T::tryString(_bytes, _bytes.length(), _max);
666}
667
668inline size_t STRING_T::split(
669 const STRING_T& _delimiter,
670 ARRAY_T& _results,
671 size_t _limit // = (size_t)-1
672 ) const
673{
674 return STRING_T::split(
675 __psz, __psz + length(),
676 _delimiter.__psz, _delimiter.length(),
677 _results,
678 _limit
679 );
680 }
681
682inline size_t STRING_T::split(
683 CHAR_T _delimiter,
684 ARRAY_T& _results,
685 size_t _limit // = (size_t)-1
686 ) const
687{
688 return STRING_T::split(
689 __psz, __psz + length(),
690 _delimiter,
691 _results,
692 _limit
693 );
694}
695
696#undef _T
697#undef CHAR_T
698#undef UCHAR_T
699#undef BUFFER_T
700#undef STRING_T
701#undef STRING_BUILDER_T
702#undef ARRAY_T
703
704#endif // __DCL_INTERNAL_
DCLCAPI bool operator!=(const STRING_T &_str1, const STRING_T &_str2)
Definition __STRING.h:424
#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:507
#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:397
DCLCAPI bool operator<(const STRING_T &_str1, const STRING_T &_str2)
Definition __STRING.h:479
DCLCAPI bool operator>(const STRING_T &_str1, const STRING_T &_str2)
Definition __STRING.h:451
DCLCAPI bool operator<=(const STRING_T &_str1, const STRING_T &_str2)
Definition __STRING.h:534
#define DCLCAPI
Definition Config.h:100
#define __DCL_THROWS1(e)
Definition Config.h:167
DCLCAPI Date operator+(const Date &d, long nDays)
Definition DateTime.cpp:178
buf release()
size_t len
void CharsetConvertException *size_t n
Definition SQLField.cpp:253
void CharsetConvertException *__fields clear()
int compare(const CHAR_T *_psz, size_t _len=(size_t) -1) const
Definition __STRING.h:387
bool isEmpty() const
Definition __STRING.h:631
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:584
const CHAR_T * data() const
Definition __STRING.h:641
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:248
@ ESCAPE_XML
Definition __STRING.h:251
@ ESCAPE_ALL
Definition __STRING.h:250
@ ESCAPE_EXTENDED
Definition __STRING.h:249
STRING_T mid(size_t _first, size_t _len=(size_t) -1) const
Definition __STRING.cpp:596
bool endsWith(const CHAR_T *_suffix) const
Definition __STRING.h:576
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:713
size_t length() const
Definition __STRING.h:636
bool contains(CHAR_T _ch) const
Definition __STRING.h:561
int compareNoCase(const CHAR_T *_psz, size_t _len=(size_t) -1) const
Definition __STRING.h:392
size_t indexOf(CHAR_T _ch, size_t _start=0) const
Definition __STRING.cpp:512
CHAR_T * __psz
Definition __STRING.h:58
STRING_T & assign(const STRING_T &_str)
Definition __STRING.cpp:380
BUFFER_T * __buf() const
Definition __STRING.h:59
STRING_T substring(size_t _first) const
Definition __STRING.h:600
STRING_T rreplace(size_t _start, size_t _len, const CHAR_T *_new, size_t _newlen=(size_t) -1) const
Definition __STRING.cpp:740
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