Xalan-C++ API Reference 1.12.0
XalanDOMString.hpp
Go to the documentation of this file.
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 */
18#if !defined(XALANDOMSTRING_HEADER_GUARD_1357924680)
19#define XALANDOMSTRING_HEADER_GUARD_1357924680
20
21
22
24
25
26
27#include <cassert>
28
29
30
34
35
36
38
39
40
41namespace XALAN_CPP_NAMESPACE {
42
43
44
46{
47public:
48
52
56
58
63
64 static const size_type npos;
65
67
68 explicit
70 const char* theString,
71 MemoryManager& theManager XALAN_DEFAULT_MEMMGR,
73
79
80 explicit
83 MemoryManager& theManager XALAN_DEFAULT_MEMMGR,
85
89 MemoryManager& theManager XALAN_DEFAULT_MEMMGR);
90
92 clone(MemoryManager& theManager);
93
95 {
96 }
97
100 {
101 return assign(theRHS);
102 }
103
106 {
107 return assign(theRHS);
108 }
109
111 operator=(const char* theRHS)
112 {
113 return assign(theRHS);
114 }
115
118 {
119 return assign(1, theRHS);
120 }
121
122 iterator
124 {
125 invariants();
126
127 return m_data.begin();
128 }
129
130 const_iterator
131 begin() const
132 {
133 invariants();
134
135 return m_data.begin();
136 }
137
138 iterator
140 {
141 invariants();
142
143 return m_data.empty() == true ? m_data.end() : m_data.end() - 1;
144 }
145
146 const_iterator
147 end() const
148 {
149 invariants();
150
151 return m_data.empty() == true ? m_data.end() : m_data.end() - 1;
152 }
153
154 reverse_iterator
156 {
157 invariants();
158
159 reverse_iterator i = m_data.rbegin();
160
161 if (m_data.empty() == false)
162 {
163 ++i;
164 }
165
166 return i;
167 }
168
169 const_reverse_iterator
170 rbegin() const
171 {
172 invariants();
173
174 const_reverse_iterator i = m_data.rbegin();
175
176 if (m_data.empty() == false)
177 {
178 ++i;
179 }
180
181 return i;
182 }
183
184 reverse_iterator
186 {
187 invariants();
188
189 return m_data.rend();
190 }
191
192 const_reverse_iterator
193 rend() const
194 {
195 invariants();
196
197 return m_data.rend();
198 }
199
201 size() const
202 {
203 invariants();
204
205 return m_size;
206 }
207
209 length() const
210 {
211 invariants();
212
213 return size();
214 }
215
217 max_size() const
218 {
219 invariants();
220
221 return ~size_type(0);
222 }
223
224 void
228
229 void
231 {
232 invariants();
233
234 resize(theCount, XalanDOMChar(0));
235 }
236
238 capacity() const
239 {
240 invariants();
241
243 m_data.capacity();
244
245 return theCapacity == 0 ? 0 : size_type(theCapacity - 1);
246 }
247
248 void
250 {
251 invariants();
252
253 m_data.reserve(theCount + 1);
254 }
255
256 void
258 {
259 invariants();
260
261 m_data.erase(m_data.begin(), m_data.end());
262
263 m_size = 0;
264
265 invariants();
266 }
267
268 iterator
270 {
271 invariants();
272
273 m_data.erase(thePosition);
274
275 --m_size;
276
277 invariants();
278
279 return thePosition;
280 }
281
282 iterator
286 {
287 invariants();
288
289 m_data.erase(theFirst, theLast);
290
291 m_size = m_data.size() - 1;
292
293 invariants();
294
295 return theFirst;
296 }
297
302
303 bool
304 empty() const
305 {
306 invariants();
307
308 return m_size == 0 ? true : false;
309 }
310
311 const_reference
313 {
314 invariants();
315
316 return m_data[theIndex];
317 }
318
319 reference
321 {
322 invariants();
323
324 return m_data[theIndex];
325 }
326
327 const_reference
329 {
330 invariants();
331
332 return m_data.at(theIndex);
333 }
334
335 reference
337 {
338 invariants();
339
340 return m_data.at(theIndex);
341 }
342
343 const XalanDOMChar*
344 c_str() const
345 {
346 invariants();
347
348 return m_data.empty() == true ? &s_empty : &m_data[0];
349 }
350
351 const XalanDOMChar*
352 data() const
353 {
354 invariants();
355
356 return c_str();
357 }
358
359 void
361 {
362 invariants();
363
364 m_data.swap(theOther.m_data);
365
366 std::swap(m_size, theOther.m_size);
367 }
368
371 {
372 return append(theSource);
373 }
374
377 {
378 return append(theString);
379 }
380
383 {
384 append(1, theChar);
385
386 return *this;
387 }
388
391 {
392 invariants();
393
394 erase();
395
396 invariants();
397
398 return append(theSource);
399 }
400
403 const XalanDOMChar* theSource,
405 {
406 invariants();
407
408 erase();
409
410 invariants();
411
412 return append(theSource, theCount);
413 }
414
416 assign(const char* theSource)
417 {
418 invariants();
419
420 erase();
421
422 invariants();
423
424 return append(theSource);
425 }
426
429 const char* theSource,
431 {
432 invariants();
433
434 erase();
435
436 invariants();
437
438 return append(theSource, theCount);
439 }
440
446
449 {
450 invariants();
451
452 if (&theSource != this)
453 {
454 m_data = theSource.m_data;
455
456 m_size = theSource.m_size;
457 }
458
459 invariants();
460
461 return *this;
462 }
463
468 {
469 invariants();
470
471 erase();
472
473 invariants();
474
475 return append(theCount, theChar);
476 }
477
482
485 {
486 return append(theSource.c_str(), theSource.length());
487 }
488
494 {
495 assert(thePosition < theSource.length() &&
496 (theCount == size_type(npos) || thePosition + theCount <= theSource.length()));
497
498 return append(theSource.c_str() + thePosition, theCount);
499 }
500
503 const XalanDOMChar* theString,
505
508 {
510 }
511
514 const char* theString,
516
518 append(const char* theString)
519 {
521 }
522
527
528 void
530 {
531 invariants();
532
533 append(1, theChar);
534
535 invariants();
536 }
537
542 {
543 return insert(thePosition, theString.c_str(), theString.length());
544 }
545
555
559 const XalanDOMChar* theString,
561
569
575
580
581 void
586
587 void
592
593
598 size_type theCount = size_type(npos)) const
599 {
600 assert((theCount == size_type(npos) && thePosition < length() ) ||
601 (thePosition + theCount <= length()));
602
603 invariants();
604
605 return theSubstring.assign(
606 *this,
608 theCount == npos ? length() : theCount);
609 }
610
611 int
613 {
614 invariants();
615
616 return compare(theString.c_str());
617 }
618
619 int
623 const XalanDOMString& theString) const
624 {
625 invariants();
626
627 return compare(thePosition1, theCount1, theString.c_str(), theString.length());
628 }
629
630 int
636 size_type theCount2) const
637 {
638 invariants();
639
641 }
642
643 int
645
646 int
650 const XalanDOMChar* theString,
651 size_type theCount2 = size_type(npos)) const;
652
653
654 void
655 reset(MemoryManager& theManager, const char* theString);
656
657 void
658 reset(MemoryManager& theManager, const XalanDOMChar* theString);
659
661 {
662 public:
663
665 XalanDOMException(TRANSCODING_ERR)
666 {
667 }
668
669 virtual
671 {
672 }
673 };
674
675
676
677 /**
678 * Transcode the string to the local code page. If the string
679 * cannot be properly transcoded, and the transcoder can detect
680 * the error a TranscodingError exception is thrown.
681 *
682 * @param theResult A CharVectorType instance for the transcoded string. The string is null-terminated.
683 */
684 void
686
687 MemoryManager&
689 {
690 return m_data.getMemoryManager();
691 }
692
693 size_t
694 hash() const
695 {
696 return hash(c_str(), length());
697 }
698
699 static size_t
708
709 static bool
711 const XalanDOMChar* theLHS,
713 const XalanDOMChar* theRHS,
715
716 static bool
718 const XalanDOMChar* theLHS,
719 const XalanDOMChar* theRHS)
720 {
722 }
723
724 static bool
726 const XalanDOMString& theLHS,
727 const XalanDOMString& theRHS);
728
729 static bool
731 const XalanDOMString& theLHS,
732 const XalanDOMChar* theRHS)
733 {
734 return equals(theLHS.c_str(), theRHS);
735 }
736
737 static bool
739 const XalanDOMChar* theLHS,
740 const XalanDOMString& theRHS)
741 {
742 return equals(theLHS, theRHS.c_str());
743 }
744
745 /*
746 * Helper function to determine the length of a null-
747 * terminated string.
748 *
749 * @theString The string
750 * @return the length
751 */
752 static size_type
754
755 /*
756 * Helper function to determine the length of a null-
757 * terminated string.
758 *
759 * @theString The string
760 * @return the length
761 */
762 static size_type
763 length(const char* theString);
764
765protected:
766
767 /*
768 * Function to assert invariant conditions for the class.
769 *
770 * @return the iterator
771 */
772 void
774 {
775#if !defined(NDEBUG)
776 assert((m_data.empty() == true && m_size == 0) || m_size == m_data.size() - 1);
777 assert(m_data.empty() == true || m_data.back() == 0);
778#endif
779 }
780
781 /*
782 * Get an iterator to the position of the terminating null.
783 *
784 * @return the iterator
785 */
786 iterator
788 {
789 invariants();
790
791 return m_data.empty() == true ? m_data.end() : m_data.end() - 1;
792 }
793
794 const_iterator
796 {
797 invariants();
798
799 return m_data.empty() == true ? m_data.end() : m_data.end() - 1;
800 }
801
802 iterator
804 {
805 invariants();
806
807 return m_data.begin() + thePosition;
808 }
809
810 const_iterator
812 {
813 invariants();
814
815 return m_data.begin() + thePosition;
816 }
817
818#if defined (XALAN_DEVELOPMENT)
819 // not defined
822#endif
823
824private:
825
826
828
829 size_type m_size;
830
831 static const XalanDOMChar s_empty;
832};
833
834
835
836/**
837 * Hash functor for DOMStrings
838 *
839 * @param theKey XalanDOMString to be hashed
840 * @return hash value for XalanDOMString
841 */
843{
844 size_t
846 {
847 return theKey.hash();
848 }
849};
850
851
852
853/**
854 * Hash functor for DOMStrings
855 *
856 * @param theKey XalanDOMString to be hashed
857 * @return hash value for XalanDOMString
858 */
860{
861 size_t
863 {
864 assert (theKey != 0);
865
866 return theKey->hash();
867 }
868};
869
870
871
872template<>
878
879template<>
885
886
887/**
888 * Equals functor for DOMStrings
889 *
890 * @param theLHS first string to compare
891 * @param theRHS second string to compare
892 * @return true if the contents of both strings are identical
893 */
895{
896 bool
898 const XalanDOMString& theRHS) const
899 {
900 return XalanDOMString::equals(theLHS, theRHS);
901 }
902};
903
904
905
906/**
907 * Not equals functor for DOMStrings
908 *
909 * @param theLHS first string to compare
910 * @param theRHS second string to compare
911 * @return true if the contents of both strings are identical
912 */
914{
915 bool
917 const XalanDOMString& theRHS) const
918 {
919 return !XalanDOMString::equals(theLHS, theRHS);
920 }
921};
922
923
924
925/**
926 * Less than functor for DOMStrings
927 *
928 * @param theLHS first string to compare
929 * @param theRHS second string to compare
930 * @return true if the theLHS is less than theRHSl
931 */
933{
934 bool
936 const XalanDOMString& theRHS) const
937 {
938 return theLHS.compare(theRHS) < 0 ? true : false;
939 }
940};
941
942
943/**
944 * Equal to functor for DOMStrings
945 *
946 * @param theLHS first string to compare
947 * @param theRHS second string to compare
948 * @return true if the theLHS is equal to theRHS
949 */
951{
952 bool
954 const XalanDOMString* theRHS) const
955 {
956 assert(theLHS != 0 && theRHS != 0);
957
958 return XalanDOMString::equals(*theLHS, *theRHS);
959 }
960};
961
962
963/**
964 * Less than functor for DOMStrings
965 *
966 * @param theLHS first string to compare
967 * @param theRHS second string to compare
968 * @return true if the theLHS is less than theRHSl
969 */
971{
972 bool
974 const XalanDOMString* theRHS) const
975 {
976 assert(theLHS != 0 && theRHS != 0);
977
978 return theLHS->compare(*theRHS) < 0 ? true : false;
979 }
980};
981
982
983
984template<>
986{
988 typedef std::equal_to<XalanDOMString> Comparator;
989};
990
991
992
993inline bool
995 const XalanDOMString& theLHS,
996 const XalanDOMString& theRHS)
997{
998 return XalanDOMString::equals(theLHS, theRHS);
999}
1000
1001
1002
1003inline bool
1005 const XalanDOMString& theLHS,
1006 const XalanDOMChar* theRHS)
1007{
1008 return XalanDOMString::equals(theLHS, theRHS);
1009}
1010
1011
1012
1013inline bool
1015 const XalanDOMChar* theLHS,
1016 const XalanDOMString& theRHS)
1017{
1018 // Note reversing of operands...
1019 return XalanDOMString::equals(theLHS, theRHS);
1020}
1021
1022
1023
1024inline bool
1026 const XalanDOMString& theLHS,
1027 const XalanDOMString& theRHS)
1028{
1029 return !(theLHS == theRHS);
1030}
1031
1032
1033
1034inline bool
1036 const XalanDOMChar* theLHS,
1037 const XalanDOMString& theRHS)
1038{
1039 return !(theLHS == theRHS);
1040}
1041
1042
1043
1044inline bool
1046 const XalanDOMString& theLHS,
1047 const XalanDOMChar* theRHS)
1048{
1049 return !(theRHS == theLHS);
1050}
1051
1052
1053#if 0
1054inline XalanDOMString&
1055add(
1056 const XalanDOMString& theLHS,
1057 const XalanDOMString& theRHS,
1058 XalanDOMString& result)
1059{
1060 result.assign(theLHS);
1061
1062 return result += theRHS;
1063}
1064
1065
1066
1067inline XalanDOMString&
1068add(
1069 const XalanDOMString& theLHS,
1070 const XalanDOMChar* theRHS,
1071 XalanDOMString& result)
1072{
1073 result.assign(theLHS);
1074
1075 return result += theRHS;
1076}
1077
1078
1079
1080inline XalanDOMString&
1081add(
1082 const XalanDOMChar* theLHS,
1083 const XalanDOMString& theRHS,
1084 XalanDOMString& result)
1085{
1086 result.assign(theLHS);
1087
1088 return result += theRHS;
1089}
1090
1091
1092
1093inline const XalanDOMString&
1094add(
1095 const char* theLHS,
1096 const XalanDOMString& theRHS,
1097 XalanDOMString& result)
1098{
1099 result.assign(theLHS);
1100
1101 result.append(theRHS);
1102
1103 return result;
1104}
1105
1106
1107
1108inline const XalanDOMString&
1109add(
1110 const XalanDOMString& theLHS,
1111 const char* theRHS,
1112 XalanDOMString& result)
1113{
1114 result.assign(theLHS);
1115
1116 result.append(theRHS);
1117
1118 return result;
1119}
1120#endif
1121
1122
1123// Standard vector of XalanDOMChars and chars
1125
1127
1128
1129
1130
1131
1132/**
1133 * Convert a XalanDOMChar string to C++ standard library
1134 * vector, transcoding to the default local code
1135 * page.
1136 *
1137 * @param sourceString The source string
1138 * @param sourceStringLength The source string length.
1139 * @param targetVector The target string
1140 * @param terminate If true, the transcoded string will be null-terminated
1141 * @return true if successful, false if not.
1142 */
1144TranscodeToLocalCodePage(
1148 bool terminate = false);
1149
1150/**
1151 * Convert a XalanDOMChar string to C++ standard library
1152 * vector, transcoding to the default local code
1153 * page. If the source string contines code points, that can't be
1154 * represented in the local code page, the substitution character will be used
1155 *
1156 * @param sourceString The source string
1157 * @param sourceStringLength The source string length.
1158 * @param targetVector The target string
1159 * @param terminate If true, the transcoded string will be null-terminated
1160 * @param theSubstitutionChar The substitution character for code points that are not presentable
1161 * in the local page
1162 */
1164TranscodeToLocalCodePage(
1168 bool terminate,
1169 char theSubstitutionChar);
1170
1171/**
1172 * Convert a string to a XalanDOMString, transcoding from
1173 * the default local code page.
1174 *
1175 * @param theSourceString The source string
1176 * @param theSourceStringLength The source string length.
1177 * @return The new string.
1178 */
1179#if !defined(XALAN_DEVELOPMENT)
1180inline const XalanDOMString
1182 const char* theSourceString,
1183 XalanDOMString::size_type theSourceStringLength = XalanDOMString::npos)
1184{
1185 return XalanDOMString(theSourceString,XalanMemMgrs::getDefaultXercesMemMgr(), theSourceStringLength);
1186}
1187#endif
1188
1189
1190/**
1191 * Convert a XalanDOMChar string to C++ standard library
1192 * vector, transcoding to the default local code
1193 * page. The string _must_ be null-terminated.
1194 *
1195 * @param theSourceString The source string
1196 * @param targetVector The target string
1197 * @param terminate If true, the transcoded string will be null-terminated
1198 * @return true if successful, false if not.
1199 */
1201TranscodeToLocalCodePage(
1204 bool terminate = false);
1205
1206/**
1207 * Convert a XalanDOMChar string to C++ standard library
1208 * vector, transcoding to the default local code
1209 * page. The string _must_ be null-terminated.
1210 *
1211 * @param theSourceString The source string
1212 * @param targetVector The target string
1213 * @param terminate If true, the transcoded string will be null-terminated
1214 */
1216TranscodeToLocalCodePage(
1219 bool terminate,
1220 char theSubstitutionChar);
1221
1222/**
1223 * Convert XalanDOMString to C++ standard library
1224 * vector, transcoding to the default local code
1225 * page. Null-terminate the sttring...
1226 *
1227 * @param theSourceString source string
1228 * @return The transcoded string.
1229 */
1230#if !defined(XALAN_DEVELOPMENT)
1231inline const CharVectorType
1240#endif
1241
1242
1243/**
1244 * Convert XalanDOMString to C++ standard library
1245 * vector, transcoding to the default local code
1246 * page.
1247 *
1248 * @param theSourceString The source string
1249 * @param theTargetVector The target string
1250 * @return true if successful, false if not.
1251 */
1252inline bool
1256 bool terminate = false)
1257{
1259 theSourceString.c_str(),
1261 terminate);
1262}
1263
1264/**
1265 * Convert XalanDOMString to C++ standard library
1266 * vector, transcoding to the default local code
1267 * page.
1268 *
1269 * @param theSourceString The source string
1270 * @param targetVector The target string
1271 * @param terminate If true, the transcoded string will be null-terminated
1272 * @param theSubstitutionChar The substitution character for code points that are not presentable
1273 * in the local page
1274 */
1276TranscodeToLocalCodePage(
1279 bool terminate,
1280 char theSubstitutionChar);
1281
1282
1283
1284/**
1285 * Convert XalanDOMString to C++ standard library
1286 * vector, transcoding to the default local code
1287 * page.
1288 *
1289 * @param thetheSourceString source string
1290 * @return The transcoded string.
1291 */
1292#if !defined(XALAN_DEVELOPMENT)
1293inline const CharVectorType
1302#endif
1303
1304
1305/**
1306 * Convert a string to a XalanDOMString, transcoding from
1307 * the default local code page.
1308 *
1309 * @param theSourceString The source string
1310 * @param theResult The result.
1311 * @param theSourceStringLength The source string length.
1312 * @return The new string.
1313 */
1314inline const XalanDOMString&
1324
1325
1326
1327/**
1328 * Convert a string to a C++ standard library
1329 * vector, transcoding from the default local code
1330 * page.
1331 *
1332 * @param theSourceString The source string
1333 * @param theSourceStringLength The source string length.
1334 * @param targetVector The target string
1335 * @param terminate If true, the transcoded string will be null-terminated
1336 * @return true if successful, false if not.
1337 */
1339TranscodeFromLocalCodePage(
1340 const char* theSourceString,
1343 bool terminate = false);
1344
1345/**
1346 * Convert a string to a C++ standard library
1347 * vector, transcoding from the default local code
1348 * page. The string _must_ be null-terminated.
1349 *
1350 * @param sourceString The source string
1351 * @param targetVector The target string
1352 * @param terminate If true, the transcoded string will be null-terminated
1353 * @return true if successful, false if not.
1354 */
1356TranscodeFromLocalCodePage(
1357 const char* theSourceString,
1359 bool terminate = false);
1360
1361/**
1362 * Convert a string to a C++ standard library
1363 * vector, transcoding from the default local code
1364 * page.
1365 *
1366 * @param theSourceString The source string
1367 * @param theSourceStringLength The source string length.
1368 * @param theSourceStringIsNullTerminated true if the source string is null-terminated, otherwise false.
1369 * @param targetVector The target string
1370 * @param terminate If true, the transcoded string will be null-terminated
1371 * @return true if successful, false if not.
1372 */
1374TranscodeFromLocalCodePage(
1375 const char* theSourceString,
1379 bool terminate = false);
1380
1381/**
1382 * Convert a vector of characters to a XalanDOMString,
1383 * transcoding from the default local code
1384 *
1385 * @param theSourceString The source vector.
1386 * @param theResult The result.
1387 * @return The transcoded string.
1388 */
1390TranscodeFromLocalCodePage(
1393
1394
1396
1397
1398
1399}
1400
1401
1402
1403#endif // !defined(XALANDOMSTRING_HEADER_GUARD_1357924680)
#define XALAN_DOM_EXPORT
#define XALAN_DOM_EXPORT_FUNCTION(T)
#define XALAN_DEFAULT_CONSTRUCTOR_MEMMGR
#define XALAN_DEFAULT_MEMMGR
#define XALAN_USES_MEMORY_MANAGER(Type)
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
const_iterator getBackInsertIterator() const
const XalanDOMChar * c_str() const
void push_back(XalanDOMChar theChar)
XalanDOMString & insert(size_type thePosition, const XalanDOMString &theString)
void transcode(CharVectorType &theResult) const
Transcode the string to the local code page.
XalanDOMString(const char *theString, MemoryManager &theManager XALAN_DEFAULT_MEMMGR, size_type theCount=size_type(npos))
XalanDOMString & operator+=(const XalanDOMChar *theString)
const XalanDOMChar * data() const
XalanDOMString & assign(const XalanDOMString &theSource)
size_type max_size() const
int compare(const XalanDOMChar *theString) const
int compare(size_type thePosition1, size_type theCount1, const XalanDOMString &theString) const
const_reference at(size_type theIndex) const
XalanDOMString & assign(iterator theFirstPosition, iterator theLastPosition)
static bool equals(const XalanDOMString &theLHS, const XalanDOMString &theRHS)
int compare(size_type thePosition1, size_type theCount1, const XalanDOMString &theString, size_type thePosition2, size_type theCount2) const
XalanDOMString & assign(const XalanDOMString &theSource, size_type thePosition, size_type theCount)
XalanDOMCharVectorType::iterator iterator
XalanDOMString & append(const char *theString)
iterator erase(iterator theFirst, iterator theLast)
XalanDOMString & operator+=(const XalanDOMString &theSource)
XalanDOMString & operator=(const char *theRHS)
iterator insert(iterator thePosition, XalanDOMChar theChar)
const_iterator end() const
reverse_iterator rend()
XalanDOMString & assign(const XalanDOMChar *theSource, size_type theCount)
XalanDOMString(const XalanDOMChar *theString, MemoryManager &theManager XALAN_DEFAULT_MEMMGR, size_type theCount=size_type(npos))
XalanDOMString & substr(XalanDOMString &theSubstring, size_type thePosition=0, size_type theCount=size_type(npos)) const
reverse_iterator rbegin()
XalanDOMString & operator=(const XalanDOMString &theRHS)
XalanDOMString & append(const XalanDOMString &theSource)
XalanDOMString & append(const XalanDOMString &theSource, size_type thePosition, size_type theCount)
XalanDOMString & insert(size_type thePosition1, const XalanDOMString &theString, size_type thePosition2, size_type theCount)
const_reverse_iterator rbegin() const
static bool equals(const XalanDOMString &theLHS, const XalanDOMChar *theRHS)
static bool equals(const XalanDOMChar *theLHS, size_type theLHSLength, const XalanDOMChar *theRHS, size_type theRHSLength)
static size_type length(const char *theString)
iterator getIteratorForPosition(size_type thePosition)
XalanDOMString & append(const char *theString, size_type theCount)
XalanDOMString & insert(size_type thePosition, const XalanDOMChar *theString)
XalanDOMString(MemoryManager &theManager XALAN_DEFAULT_CONSTRUCTOR_MEMMGR)
XalanDOMString & erase(size_type theStartPosition=0, size_type theCount=size_type(npos))
XalanVector< char > CharVectorType
size_type capacity() const
static size_t hash(const XalanDOMChar *theString, size_type theLength)
const_reverse_iterator rend() const
void reserve(size_type theCount=0)
size_type length() const
iterator erase(iterator thePosition)
XalanDOMString & assign(size_type theCount, XalanDOMChar theChar)
XalanDOMString & insert(size_type thePosition, size_type theCount, XalanDOMChar theChar)
XalanDOMString & operator+=(XalanDOMChar theChar)
int compare(size_type thePosition1, size_type theCount1, const XalanDOMChar *theString, size_type theCount2=size_type(npos)) const
void insert(iterator thePosition, size_type theCount, XalanDOMChar theChar)
XalanDOMString(size_type theCount, XalanDOMChar theChar, MemoryManager &theManager XALAN_DEFAULT_MEMMGR)
const_reference operator[](size_type theIndex) const
const XalanDOMChar & const_reference
XalanDOMString & append(const XalanDOMChar *theString)
XalanDOMString & assign(const XalanDOMChar *theSource)
XalanVector< XalanDOMChar > XalanDOMCharVectorType
void insert(iterator theInsertPosition, iterator theFirstPosition, iterator theLastPosition)
void reset(MemoryManager &theManager, const char *theString)
MemoryManager & getMemoryManager()
static size_type length(const XalanDOMChar *theString)
XalanDOMString & operator=(XalanDOMChar theRHS)
XalanDOMString & append(size_type theCount, XalanDOMChar theChar)
XalanVector< wchar_t > WideCharVectorType
void swap(XalanDOMString &theOther)
const_iterator begin() const
void resize(size_type theCount)
XalanDOMString & operator=(const XalanDOMChar *theRHS)
static bool equals(const XalanDOMChar *theLHS, const XalanDOMChar *theRHS)
static const size_type npos
XalanDOMCharVectorType::reverse_iterator reverse_iterator
const_iterator getIteratorForPosition(size_type thePosition) const
XalanDOMString & assign(const char *theSource, size_type theCount)
XalanDOMString & append(const XalanDOMChar *theString, size_type theCount)
XalanDOMString & assign(const char *theSource)
reference at(size_type theIndex)
XalanDOMCharVectorType::const_reverse_iterator const_reverse_iterator
reference operator[](size_type theIndex)
XalanDOMString & insert(size_type thePosition, const XalanDOMChar *theString, size_type theCount)
XalanDOMString * clone(MemoryManager &theManager)
int compare(const XalanDOMString &theString) const
static bool equals(const XalanDOMChar *theLHS, const XalanDOMString &theRHS)
void reset(MemoryManager &theManager, const XalanDOMChar *theString)
XalanDOMCharVectorType::const_iterator const_iterator
XalanDOMString(const XalanDOMString &theSource, MemoryManager &theManager XALAN_DEFAULT_CONSTRUCTOR_MEMMGR, size_type theStartPosition=0, size_type theCount=size_type(npos))
void resize(size_type theCount, XalanDOMChar theChar)
const_reverse_iterator_ const_reverse_iterator
XalanDOMString & insert(XalanDOMString &theString, XalanDOMString::size_type thePosition, const XalanDOMString &theStringToInsert)
Insert a string into another string.
TranscodeToLocalCodePage(const XalanDOMChar *theSourceString, XalanDOMString::size_type theSourceStringLength, CharVectorType &targetVector, bool terminate=false)
Convert a XalanDOMChar string to C++ standard library vector, transcoding to the default local code p...
void erase(XalanDOMString &theString)
Remove all elements from target string.
XalanDOMString::size_type length(const XalanDOMString &theString)
Get the length of a XalanDOMString.
size_t size_type
Definition XalanMap.hpp:46
XalanDOMString & assign(XalanDOMString &theString, const XalanDOMString &theStringToAssign)
Assign one string to another.
const XalanDOMString TranscodeFromLocalCodePage(const char *theSourceString, XalanDOMString::size_type theSourceStringLength=XalanDOMString::npos)
Convert a string to a XalanDOMString, transcoding from the default local code page.
compare(const CharVectorType &theLHS, const CharVectorType &theRHS)
Compare the contents of two strings.
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
bool operator!=(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
const char * c_str(const CharVectorType &theString)
Get the underlying representation of the target CharVectorType as a null-terminated string.
XalanDOMString & append(XalanDOMString &theString, const XalanDOMString &theStringToAppend)
Concatenate two strings.
equals(const XalanDOMChar *theLHS, const XalanDOMChar *theRHS, XalanDOMString::size_type theLength)
Compare the contents of two arrays for equality.
Equals functor for DOMStrings.
Hash functor for DOMStrings.
Less than functor for DOMStrings.
Not equals functor for DOMStrings.
Equal to functor for DOMStrings.
Hash functor for DOMStrings.
Less than functor for DOMStrings.
std::equal_to< XalanDOMString > Comparator
pointer_equal< XalanDOMString > Comparator