18 #if !defined(DOMSTRINGHELPER_HEADER_GUARD_1357924680)
19 #define DOMSTRINGHELPER_HEADER_GUARD_1357924680
56 using xercesc::MemoryManager;
60 class XalanOutputStream;
64 template<
class InputIteratorType,
class OutputIteratorType>
65 inline OutputIteratorType
67 InputIteratorType begin,
68 InputIteratorType end,
69 OutputIteratorType iterator)
71 return std::copy(begin, end, iterator);
76 template<
class InputIteratorType,
class OutputIteratorType,
class UnaryFunction>
77 inline OutputIteratorType
79 InputIteratorType begin,
80 InputIteratorType end,
81 OutputIteratorType iterator,
82 UnaryFunction
function)
84 return std::transform(begin, end, iterator,
function);
98 inline const XalanDOMChar*
101 return theString.
c_str();
116 if (theString.
empty() ==
true)
122 const char*
const ptr = &theString[0];
124 assert(ptr[theString.
size() - 1] ==
'\0');
149 inline const XalanDOMChar*
166 inline const XalanDOMChar*
169 return theString.
c_str();
182 inline const XalanDOMChar*
202 return theString.
empty() ==
true ? 0 : &theString[0];
237 return theString.
length();
252 assert(theString != 0);
254 const XalanDOMChar* theBufferPointer = theString;
256 while(*theBufferPointer != 0)
275 assert(theString != 0);
309 const XalanDOMChar* theString,
310 XalanDOMChar theChar)
312 assert(theString != 0);
314 const XalanDOMChar* thePointer = theString;
316 while(*thePointer != theChar && *thePointer != 0)
338 const XalanDOMChar* theString,
340 XalanDOMChar theChar)
342 assert(theString != 0);
344 const XalanDOMChar* thePointer = theString;
345 const XalanDOMChar*
const theEndPointer = theString + theStringLength;
347 while(*thePointer != theChar && thePointer != theEndPointer)
369 XalanDOMChar theChar)
389 const XalanDOMChar* theString,
391 const XalanDOMChar* theSubstring,
407 const XalanDOMChar* theString,
408 const XalanDOMChar* theSubstring)
410 assert(theString != 0 && theSubstring != 0);
445 const XalanDOMChar* theString,
446 XalanDOMChar theChar);
462 XalanDOMChar theChar)
480 const XalanDOMChar* theString,
482 const XalanDOMChar* theSubstring,
496 const XalanDOMChar* theString,
497 const XalanDOMChar* theSubstring)
499 assert(theString != 0 && theSubstring != 0);
515 const XalanDOMChar* theString,
518 assert(theString != 0);
523 theSubstring.
c_str(),
539 const XalanDOMChar* theSubstring)
541 assert(theSubstring != 0);
563 const XalanDOMChar* theSubstring,
566 assert(theSubstring != 0);
592 theSubstring.
c_str(),
607 const XalanDOMChar* theString,
609 const XalanDOMChar* theSubstring,
623 const XalanDOMChar* theString,
624 const XalanDOMChar* theSubstring)
626 assert(theString != 0 && theSubstring != 0);
652 theSubstring.
c_str(),
667 const
void* theValue,
689 MemberFunctionPtr
function);
695 MemberFunctionPtr
function);
701 MemberFunctionPtr
function);
761 static_cast<XMLUInt64
>(theValue),
774 inline XalanDOMString&
780 static_cast<XMLInt64
>(theValue),
793 inline XalanDOMString&
799 static_cast<XMLUInt64
>(theValue),
812 inline XalanDOMString&
818 static_cast<XMLInt64
>(theValue),
865 static_cast<XMLUInt64
>(theValue),
878 inline XalanDOMString&
884 static_cast<XMLInt64
>(theValue),
897 inline XalanDOMString&
903 static_cast<XMLUInt64
>(theValue),
916 inline XalanDOMString&
922 static_cast<XMLInt64
>(theValue),
970 const XalanDOMChar* theString,
971 MemoryManager& theMemoryManager);
1009 inline unsigned long
1027 MemoryManager& theMemoryManager)
1059 std::ostream& theStream,
1074 const XalanDOMChar* theString);
1087 std::ostream& theStream,
1088 const XalanDOMChar* theString,
1089 MemoryManager& theMemoryManager);
1105 if (theString.empty() ==
false)
1125 std::ostream& theStream,
1127 MemoryManager& theMemoryManager)
1165 inline std::ostream&
1167 std::ostream& theStream,
1189 const XalanDOMChar* theString)
1207 inline std::ostream&
1209 std::ostream& theStream,
1210 const XalanDOMChar* theString)
1215 XalanMemMgrs::getDefault());
1249 inline std::ostream&
1251 std::ostream& theStream,
1257 XalanMemMgrs::getDefault());
1271 inline std::ostream&
1273 std::ostream& theStream,
1300 return theString[theIndex];
1314 return XalanXMLChar::isWhitespace(theChar);
1328 return XalanXMLChar::isDigit(theChar);
1342 return XalanXMLChar::isDigit(theChar) ||
1343 XalanXMLChar::isLetter(theChar);
1365 const XalanDOMChar* theString,
1423 if (theChar >= XalanUnicode::charLetter_A && theChar <= XalanUnicode::charLetter_Z)
1425 return XalanDOMChar(theChar - (XalanUnicode::charLetter_A - XalanUnicode::charLetter_a));
1446 if (theChar >= XalanUnicode::charLetter_a && theChar <= XalanUnicode::charLetter_z)
1448 return XalanDOMChar(theChar + (XalanUnicode::charLetter_A - XalanUnicode::charLetter_a));
1468 if (theChar >= XalanUnicode::charLetter_A && theChar <= XalanUnicode::charLetter_Z)
1470 return XalanDOMChar(theChar - (XalanUnicode::charLetter_A - XalanUnicode::charLetter_a));
1472 else if (theChar >= XalanUnicode::charLetter_a && theChar <= XalanUnicode::charLetter_z)
1474 return XalanDOMChar(theChar + (XalanUnicode::charLetter_A - XalanUnicode::charLetter_a));
1495 const XalanDOMChar* theString,
1540 const XalanDOMChar* theString,
1608 const XalanDOMChar* theLHS,
1610 const XalanDOMChar* theRHS,
1628 const XalanDOMChar* theLHS,
1629 const XalanDOMChar* theRHS)
1676 const XalanDOMChar* theLHS,
1702 const XalanDOMChar* theRHS)
1730 const XalanDOMChar* theLHS,
1732 const XalanDOMChar* theRHS,
1752 const XalanDOMChar* theLHS,
1753 const XalanDOMChar* theRHS)
1805 const XalanDOMChar* theRHS)
1831 const XalanDOMChar* theLHS,
1855 const XalanDOMChar* theLHS,
1857 const XalanDOMChar* theRHS,
1874 const XalanDOMChar* theLHS,
1875 const XalanDOMChar* theRHS);
1909 const XalanDOMChar* theLHS,
1928 const XalanDOMChar* theRHS)
1949 const XalanDOMChar* theLHS,
1950 const XalanDOMChar* theRHS,
1966 const XalanDOMChar* theLHS,
1968 const XalanDOMChar* theRHS,
1971 return theLHSLength != theRHSLength ? false :
equals(theLHS, theRHS, theLHSLength);
1985 const XalanDOMChar* theLHS,
1986 const XalanDOMChar* theRHS)
1990 return theLHSLength !=
length(theRHS) ? false :
equals(theLHS, theRHS, theLHSLength);
2007 return theLHS == theRHS;
2021 const XalanDOMChar* theLHS,
2024 assert(theLHS != 0);
2027 return theRHS == theLHS;
2041 const XalanDOMChar* theRHS)
2043 return equals(theRHS, theLHS);
2059 const XalanDOMChar* theRHS,
2062 return theRHSLength != theLHS.
length() ? false :
equals(theLHS.
c_str(), theRHSLength, theRHS, theRHSLength);
2078 const XalanDOMChar* theLHS,
2079 const XalanDOMChar* theRHS,
2096 const XalanDOMChar* theLHS,
2098 const XalanDOMChar* theRHS,
2101 return theLHSLength != theRHSLength ? false :
2117 const XalanDOMChar* theLHS,
2118 const XalanDOMChar* theRHS)
2122 return theLength !=
length(theRHS) ? false :
2143 return theLength != theRHS.
length() ? false :
2162 const XalanDOMChar* theLHS,
2167 return theRHSLength !=
length(theLHS) ? false :
2187 const XalanDOMChar* theRHS)
2208 return compare(theLHS, theRHS) < 0 ? true :
false;
2227 return compare(theLHS, theRHS) < 0 ? true :
false;
2242 inline XalanDOMString&
2247 theString = theStringToAssign;
2264 inline XalanDOMString&
2267 const XalanDOMChar* theStringToAssign,
2270 if (theStringToAssignLength == XalanDOMString::npos)
2272 theString.
assign(theStringToAssign);
2276 theString.
assign(theStringToAssign, theStringToAssignLength);
2293 inline XalanDOMString&
2298 theString.
append(theStringToAppend);
2315 inline XalanDOMString&
2318 const XalanDOMChar* theStringToAppend,
2321 assert(theStringToAppend != 0);
2323 if (theStringToAppendLength == XalanDOMString::npos)
2325 theString.
append(theStringToAppend);
2329 theString.
append(theStringToAppend, theStringToAppendLength);
2347 inline XalanDOMString&
2350 const char* theStringToAppend,
2373 inline XalanDOMString&
2376 const XalanDOMChar theCharToAppend)
2378 theString.
append(1, theCharToAppend);
2394 inline XalanDOMString&
2397 char theCharToAppend)
2400 char theTempBuffer[] = { theCharToAppend,
'\0' };
2402 return append(theString, theTempBuffer);
2417 inline XalanDOMString&
2423 theString.
insert(thePosition, theStringToInsert);
2440 inline XalanDOMString&
2444 const XalanDOMChar* theStringToInsert)
2446 theString.
insert(thePosition, theStringToInsert);
2513 const XalanDOMChar* theString,
2520 const
char* theString,
2537 bool fTranscode = true);
2575 return theString.
c_str();
2613 return compare(theLHS, theRHS) <= 0 ? true :
false;
2632 return compare(theLHS, theRHS) > 0 ? true :
false;
2651 return compare(theLHS, theRHS) >= 0 ? true :
false;
2674 const XalanDOMChar* theLHS,
2675 const XalanDOMChar* theRHS)
const
2704 const XalanDOMChar ch[],
2719 assert(theString != 0);
2730 #endif // DOMSTRINGHELPER_HEADER_GUARD_1357924680