Xalan-C++ API Reference  1.12.0
Classes | Namespaces | Functions
DOMStringHelper.hpp File Reference
#include <xalanc/PlatformSupport/PlatformSupportDefinitions.hpp>
#include <algorithm>
#include <cassert>
#include <functional>
#include <iosfwd>
#include <xalanc/Include/XalanVector.hpp>
#include <xalanc/Include/XalanMap.hpp>
#include <xalanc/Include/XalanMemoryManagement.hpp>
#include <xalanc/Include/STLHelper.hpp>
#include <xalanc/XalanDOM/XalanDOMString.hpp>
#include <xalanc/PlatformSupport/FormatterListener.hpp>
#include <xalanc/PlatformSupport/XalanUnicode.hpp>
#include <xalanc/PlatformSupport/XalanXMLChar.hpp>
Include dependency graph for DOMStringHelper.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  xalanc::DOMStringHelper
 
struct  xalanc::c_wstr_functor
 
struct  xalanc::DOMStringLessThanIgnoreCaseASCIIFunction
 Less than functor for DOMStrings which ignores case for the characters a-z and A-Z. More...
 
struct  xalanc::DOMStringLessThanOrEqualFunction
 Less than or equal functor for DOMStrings. More...
 
struct  xalanc::DOMStringGreaterThanFunction
 Greater than functor for DOMStrings. More...
 
struct  xalanc::DOMStringGreaterThanOrEqualFunction
 Greater than or equal functor for DOMStrings. More...
 
struct  xalanc::less_no_case_ascii_wide_string
 This functor is designed to compare 0-terminated wide strings in a case-insensitive manner. More...
 

Namespaces

 xalanc
 Simple empty elem to push on the stack when nothing else got pushed, so that pop() works correctly.
 

Functions

template<class InputIteratorType , class OutputIteratorType >
OutputIteratorType xalanc::XalanCopy (InputIteratorType begin, InputIteratorType end, OutputIteratorType iterator)
 
template<class InputIteratorType , class OutputIteratorType , class UnaryFunction >
OutputIteratorType xalanc::XalanTransform (InputIteratorType begin, InputIteratorType end, OutputIteratorType iterator, UnaryFunction function)
 
const XalanDOMChar * xalanc::c_wstr (const XalanDOMString &theString)
 Get the underlying representation of the target XalanDOMString as a null-terminated string. More...
 
const char * xalanc::c_str (const CharVectorType &theString)
 Get the underlying representation of the target CharVectorType as a null-terminated string. More...
 
const XalanDOMChar * xalanc::c_wstr (const XalanDOMChar *theString)
 Get the underlying representation of the wide string as a UNICODE null-terminated string. More...
 
const XalanDOMChar * xalanc::toCharArray (const XalanDOMString &theString)
 Get the underlying representation of the target XalanDOMString as an array of XalanDOMChar, not guaranteed to be null-terminated. More...
 
const XalanDOMChar * xalanc::toCharArray (const XalanDOMChar *theString)
 Get the underlying representation of a XalanDOMChar. More...
 
const char * xalanc::toCharArray (const CharVectorType &theString)
 Get the underlying representation of the target CharVectorType as a pointer to an array of characters. More...
 
void xalanc::reserve (XalanDOMString &theString, XalanDOMString::size_type theCount)
 Reserve some space in the string for more efficient concatenation... More...
 
XalanDOMString::size_type xalanc::length (const XalanDOMString &theString)
 Get the length of a XalanDOMString. More...
 
XalanDOMString::size_type xalanc::length (const XalanDOMChar *theString)
 Get the length of a null-terminated string of XalanDOMChar characters. More...
 
XalanDOMString::size_type xalanc::length (const char *theString)
 Get the length of a null-terminated string. More...
 
bool xalanc::isEmpty (const XalanDOMString &str)
 Determines if the target string contains any elements. More...
 
XalanDOMString::size_type xalanc::indexOf (const XalanDOMChar *theString, XalanDOMChar theChar)
 Simulates the java String method indexOf(). More...
 
XalanDOMString::size_type xalanc::indexOf (const XalanDOMChar *theString, XalanDOMString::size_type theStringLength, XalanDOMChar theChar)
 Simulates the java String method indexOf(). More...
 
XalanDOMString::size_type xalanc::indexOf (const XalanDOMString &theString, XalanDOMChar theChar)
 Simulates the java String method indexOf(). More...
 
 xalanc::indexOf (const XalanDOMChar *theString, XalanDOMString::size_type theStringLength, const XalanDOMChar *theSubstring, XalanDOMString::size_type theSubstringLength)
 Simulates the java String method indexOf(). More...
 
XalanDOMString::size_type xalanc::indexOf (const XalanDOMChar *theString, const XalanDOMChar *theSubstring)
 Simulates the java String method indexOf(). More...
 
 xalanc::indexOf (const XalanDOMString &theString, const XalanDOMString &theSubstring)
 Simulates the java String method indexOf(). More...
 
 xalanc::lastIndexOf (const XalanDOMChar *theString, XalanDOMChar theChar)
 Simulates the java String method lastIndexOf(). More...
 
XalanDOMString::size_type xalanc::lastIndexOf (const XalanDOMString &theString, XalanDOMChar theChar)
 Simulates the java String method lastIndexOf(). More...
 
 xalanc::startsWith (const XalanDOMChar *theString, XalanDOMString::size_type theStringLength, const XalanDOMChar *theSubstring, XalanDOMString::size_type theSubstringLength)
 Simulates the java String method startsWith(). More...
 
bool xalanc::startsWith (const XalanDOMChar *theString, const XalanDOMChar *theSubstring)
 Simulates the java String method startsWith(). More...
 
bool xalanc::startsWith (const XalanDOMChar *theString, const XalanDOMString &theSubstring)
 Simulates the java String method startsWith(). More...
 
bool xalanc::startsWith (const XalanDOMString &theString, const XalanDOMChar *theSubstring)
 Simulates the java String method startsWith(). More...
 
bool xalanc::startsWith (const XalanDOMString &theString, const XalanDOMChar *theSubstring, XalanDOMString::size_type theSubstringLength)
 Simulates the java String method startsWith(). More...
 
bool xalanc::startsWith (const XalanDOMString &theString, const XalanDOMString &theSubstring)
 Simulates the java String method startsWith(). More...
 
 xalanc::endsWith (const XalanDOMChar *theString, XalanDOMString::size_type theStringLength, const XalanDOMChar *theSubstring, XalanDOMString::size_type theSubstringLength)
 Simulates the java String method endsWith(). More...
 
bool xalanc::endsWith (const XalanDOMChar *theString, const XalanDOMChar *theSubstring)
 Simulates the java String method endsWith(). More...
 
bool xalanc::endsWith (const XalanDOMString &theString, const XalanDOMString &theSubstring)
 Simulates the java String method endsWith(). More...
 
 xalanc::PointerToDOMString (const void *theValue, XalanDOMString &theResult)
 Converts a pointer into a XalanDOMString. More...
 
 xalanc::NumberToDOMString (double theValue, XalanDOMString &theResult)
 Converts a double value into a XalanDOMString. More...
 
 xalanc::NumberToDOMString (XMLUInt64 theValue, XalanDOMString &theResult)
 Converts an 64-bit unsigned int value into a XalanDOMString. More...
 
 xalanc::NumberToDOMString (XMLInt64 theValue, XalanDOMString &theResult)
 Converts an 64-bit signed int value into a XalanDOMString. More...
 
XalanDOMString & xalanc::NumberToDOMString (XMLUInt32 theValue, XalanDOMString &theResult)
 Converts a 32-bit unsigned int value into a XalanDOMString. More...
 
XalanDOMString & xalanc::NumberToDOMString (XMLInt32 theValue, XalanDOMString &theResult)
 Converts a 32-bit int value into a XalanDOMString. More...
 
XalanDOMString & xalanc::NumberToDOMString (XMLUInt16 theValue, XalanDOMString &theResult)
 Converts a 16-bit unsigned int value into a XalanDOMString. More...
 
XalanDOMString & xalanc::NumberToDOMString (XMLInt16 theValue, XalanDOMString &theResult)
 Converts a 16-bit int value into a XalanDOMString. More...
 
 xalanc::NumberToHexDOMString (XMLUInt64 theValue, XalanDOMString &theResult)
 Converts an 64-bit unsigned int value into a XalanDOMString. More...
 
 xalanc::NumberToHexDOMString (XMLInt64 theValue, XalanDOMString &theResult)
 Converts an 64-bit signed int value into a XalanDOMString. More...
 
XalanDOMString & xalanc::NumberToHexDOMString (XMLUInt32 theValue, XalanDOMString &theResult)
 Converts a 32-bit unsigned int value into a XalanDOMString. More...
 
XalanDOMString & xalanc::NumberToHexDOMString (XMLInt32 theValue, XalanDOMString &theResult)
 Converts a 32-bit signed int value into a XalanDOMString. More...
 
XalanDOMString & xalanc::NumberToHexDOMString (XMLUInt16 theValue, XalanDOMString &theResult)
 Converts a 16-bit unsigned int value into a XalanDOMString. More...
 
XalanDOMString & xalanc::NumberToHexDOMString (XMLInt16 theValue, XalanDOMString &theResult)
 Converts a 16-bit signed int value into a XalanDOMString. More...
 
 xalanc::WideStringToInt (const XalanDOMChar *theString)
 Converts a wide string into an integer value. More...
 
 xalanc::WideStringToLong (const XalanDOMChar *theString)
 Converts a wide string into a long value. More...
 
 xalanc::WideStringToUnsignedLong (const XalanDOMChar *theString)
 Converts a wide string into an unsigned long value. More...
 
 xalanc::WideStringToDouble (const XalanDOMChar *theString, MemoryManager &theMemoryManager)
 Converts a wide string into a double value. More...
 
int xalanc::DOMStringToInt (const XalanDOMString &theString)
 Converts a XalanDOMString into an integer value. More...
 
long xalanc::DOMStringToLong (const XalanDOMString &theString)
 Converts a XalanDOMString into a long value. More...
 
unsigned long xalanc::DOMStringToUnsignedLong (const XalanDOMString &theString)
 Converts a XalanDOMString into a long value. More...
 
double xalanc::DOMStringToDouble (const XalanDOMString &theString, MemoryManager &theMemoryManager)
 Converts a XalanDOMString into a double value. More...
 
 xalanc::OutputString (XalanOutputStream &theStream, const CharVectorType &theString)
 Outputs the target string to the specified stream. More...
 
 xalanc::OutputString (std::ostream &theStream, const CharVectorType &theString)
 Outputs the target string to the specified stream. More...
 
 xalanc::OutputString (XalanOutputStream &theStream, const XalanDOMChar *theString)
 Outputs the target string to the specified stream. More...
 
 xalanc::OutputString (std::ostream &theStream, const XalanDOMChar *theString, MemoryManager &theMemoryManager)
 Outputs the target string to the specified stream. More...
 
void xalanc::OutputString (XalanOutputStream &theStream, const XalanDOMString &theString)
 Outputs the target string to the specified stream. More...
 
void xalanc::OutputString (std::ostream &theStream, const XalanDOMString &theString, MemoryManager &theMemoryManager)
 Outputs the target string to the specified stream. More...
 
XalanOutputStream & xalanc::operator<< (XalanOutputStream &theStream, const CharVectorType &theString)
 Outputs the string to the specified stream. More...
 
std::ostream & xalanc::operator<< (std::ostream &theStream, const CharVectorType &theString)
 Outputs the string to the specified stream. More...
 
XalanOutputStream & xalanc::operator<< (XalanOutputStream &theStream, const XalanDOMChar *theString)
 Outputs the target string to the specified stream. More...
 
std::ostream & xalanc::operator<< (std::ostream &theStream, const XalanDOMChar *theString)
 Outputs the target string to the specified stream. More...
 
XalanOutputStream & xalanc::operator<< (XalanOutputStream &theStream, const XalanDOMString &theString)
 Outputs the target string to the specified stream. More...
 
std::ostream & xalanc::operator<< (std::ostream &theStream, const XalanDOMString &theString)
 Outputs the target string to the specified stream. More...
 
std::ostream & xalanc::operator<< (std::ostream &theStream, XalanDOMString &theString)
 Outputs the target string to the specified stream. More...
 
XalanDOMChar xalanc::charAt (const XalanDOMString &theString, XalanDOMString::size_type theIndex)
 Retrieves a character at a specified index in the target string. More...
 
bool xalanc::isXMLWhitespace (XalanDOMChar theChar)
 Determines whether character represents white space. More...
 
bool xalanc::isXMLDigit (XalanDOMChar theChar)
 Determines whether character represents a digit. More...
 
bool xalanc::isXMLLetterOrDigit (XalanDOMChar theChar)
 Determines whether character represents a letter or digit. More...
 
 xalanc::substring (const XalanDOMChar *theString, XalanDOMString &theSubstring, XalanDOMString::size_type theStartIndex, XalanDOMString::size_type theEndIndex=XalanDOMString::npos)
 Simulates the java String method substring(). More...
 
 xalanc::substring (const XalanDOMString &theString, XalanDOMString &theSubstring, XalanDOMString::size_type theStartIndex, XalanDOMString::size_type theEndIndex=XalanDOMString::npos)
 Simulates the java String method substring(). More...
 
 xalanc::substring (const XalanDOMString &theString, XalanDOMString::size_type theStartIndex, XalanDOMString &theResult, XalanDOMString::size_type theEndIndex=XalanDOMString::npos)
 Simulates the java String method substring(). More...
 
XalanDOMChar xalanc::toLowerASCII (XalanDOMChar theChar)
 Converts ASCII alphabetic characters from upper case to lower case. More...
 
XalanDOMChar xalanc::toUpperASCII (XalanDOMChar theChar)
 Converts ASCII alphabetic characters from lower case to upper case. More...
 
XalanDOMChar xalanc::flipCaseASCII (XalanDOMChar theChar)
 Flips the case to of the supplied character. More...
 
 xalanc::toLowerCaseASCII (const XalanDOMChar *theString, XalanDOMString &theResult)
 Converts ASCII alphabetic characters from upper case to lower case. More...
 
 xalanc::toLowerCaseASCII (const XalanDOMString &theString, XalanDOMString &theResult)
 Converts ASCII alphabetic characters from upper case to lower case. More...
 
 xalanc::toLowerCaseASCII (XalanDOMString &theString)
 Converts ASCII alphabetic characters from upper case to lower case. More...
 
 xalanc::toUpperCaseASCII (const XalanDOMChar *theString, XalanDOMString &theResult)
 Converts ASCII alphabetic characters from lower case to upper case. More...
 
 xalanc::toUpperCaseASCII (const XalanDOMString &theString, XalanDOMString &theResult)
 Converts ASCII alphabetic characters from lower case to upper case. More...
 
 xalanc::toUpperCaseASCII (XalanDOMString &theString)
 Converts ASCII alphabetic characters from lower case to upper case. More...
 
 xalanc::compare (const CharVectorType &theLHS, const CharVectorType &theRHS)
 Compare the contents of two strings. More...
 
 xalanc::compare (const XalanDOMChar *theLHS, XalanDOMString::size_type theLHSLength, const XalanDOMChar *theRHS, XalanDOMString::size_type theRHSLength)
 Compare the contents of two character arrays. More...
 
int xalanc::compare (const XalanDOMChar *theLHS, const XalanDOMChar *theRHS)
 Compare the contents of two null-terminated strings. More...
 
int xalanc::compare (const XalanDOMString &theLHS, const XalanDOMString &theRHS)
 Compare the contents of two strings. More...
 
int xalanc::compare (const XalanDOMChar *theLHS, const XalanDOMString &theRHS)
 Compare the contents of two strings. More...
 
int xalanc::compare (const XalanDOMString &theLHS, const XalanDOMChar *theRHS)
 Compare the contents of two strings. More...
 
 xalanc::compareIgnoreCaseASCII (const XalanDOMChar *theLHS, XalanDOMString::size_type theLHSLength, const XalanDOMChar *theRHS, XalanDOMString::size_type theRHSLength)
 Compare the contents of two arrays in a case insensitive manner. More...
 
int xalanc::compareIgnoreCaseASCII (const XalanDOMChar *theLHS, const XalanDOMChar *theRHS)
 Compare the contents of two strings, in a case insensitive manner. More...
 
int xalanc::compareIgnoreCaseASCII (const XalanDOMString &theLHS, const XalanDOMString &theRHS)
 Compare the contents of two strings, in a case insensitive manner. More...
 
int xalanc::compareIgnoreCaseASCII (const XalanDOMString &theLHS, const XalanDOMChar *theRHS)
 Compare the contents of two strings, in a case insensitive manner. More...
 
int xalanc::compareIgnoreCaseASCII (const XalanDOMChar *theLHS, const XalanDOMString &theRHS)
 Compare the contents of two strings, in a case insensitive manner. More...
 
 xalanc::collationCompare (const XalanDOMChar *theLHS, XalanDOMString::size_type theLHSLength, const XalanDOMChar *theRHS, XalanDOMString::size_type theRHSLength)
 Compare the contents of two character arrays. More...
 
 xalanc::collationCompare (const XalanDOMChar *theLHS, const XalanDOMChar *theRHS)
 Compare the contents of two strings. More...
 
int xalanc::collationCompare (const XalanDOMString &theLHS, const XalanDOMString &theRHS)
 Compare the contents of two strings. More...
 
int xalanc::collationCompare (const XalanDOMChar *theLHS, const XalanDOMString &theRHS)
 Compare the contents of two strings. More...
 
int xalanc::collationCompare (const XalanDOMString &theLHS, const XalanDOMChar *theRHS)
 Compare the contents of two strings. More...
 
 xalanc::equals (const XalanDOMChar *theLHS, const XalanDOMChar *theRHS, XalanDOMString::size_type theLength)
 Compare the contents of two arrays for equality. More...
 
bool xalanc::equals (const XalanDOMChar *theLHS, XalanDOMString::size_type theLHSLength, const XalanDOMChar *theRHS, XalanDOMString::size_type theRHSLength)
 Compare the contents of two arrays for equality. More...
 
bool xalanc::equals (const XalanDOMChar *theLHS, const XalanDOMChar *theRHS)
 Compare the contents of two strings for equality. More...
 
bool xalanc::equals (const XalanDOMString &theLHS, const XalanDOMString &theRHS)
 Compare the contents of two strings for equality. More...
 
bool xalanc::equals (const XalanDOMChar *theLHS, const XalanDOMString &theRHS)
 Compare the contents of two strings for equality. More...
 
bool xalanc::equals (const XalanDOMString &theLHS, const XalanDOMChar *theRHS)
 Compare the contents of two strings for equality. More...
 
bool xalanc::equals (const XalanDOMString &theLHS, const XalanDOMChar *theRHS, XalanDOMString::size_type theRHSLength)
 Compare the contents of two strings for equality. More...
 
 xalanc::equalsIgnoreCaseASCII (const XalanDOMChar *theLHS, const XalanDOMChar *theRHS, XalanDOMString::size_type theLength)
 Compare the contents of two arrays for equality, without regard for case. More...
 
bool xalanc::equalsIgnoreCaseASCII (const XalanDOMChar *theLHS, XalanDOMString::size_type theLHSLength, const XalanDOMChar *theRHS, XalanDOMString::size_type theRHSLength)
 Compare the contents of two strings for equality, without regard for case. More...
 
bool xalanc::equalsIgnoreCaseASCII (const XalanDOMChar *theLHS, const XalanDOMChar *theRHS)
 Compare the contents of two strings for equality, without regard for case. More...
 
bool xalanc::equalsIgnoreCaseASCII (const XalanDOMString &theLHS, const XalanDOMString &theRHS)
 Compare the contents of two strings for equality, without regard for case Only the characters A-Z and a-z are considered. More...
 
bool xalanc::equalsIgnoreCaseASCII (const XalanDOMChar *theLHS, const XalanDOMString &theRHS)
 Compare the contents of two strings for equality, without regard for case. More...
 
bool xalanc::equalsIgnoreCaseASCII (const XalanDOMString &theLHS, const XalanDOMChar *theRHS)
 Compare the contents of two strings for equality, without regard for case. More...
 
bool xalanc::operator< (const CharVectorType &theLHS, const CharVectorType &theRHS)
 Implements operator< for CharVectorType. More...
 
bool xalanc::operator< (const XalanDOMString &theLHS, const XalanDOMString &theRHS)
 Implements operator< for DOMStrings. More...
 
XalanDOMString & xalanc::assign (XalanDOMString &theString, const XalanDOMString &theStringToAssign)
 Assign one string to another. More...
 
XalanDOMString & xalanc::assign (XalanDOMString &theString, const XalanDOMChar *theStringToAssign, XalanDOMString::size_type theStringToAssignLength=XalanDOMString::npos)
 Assign one string to another. More...
 
XalanDOMString & xalanc::append (XalanDOMString &theString, const XalanDOMString &theStringToAppend)
 Concatenate two strings. More...
 
XalanDOMString & xalanc::append (XalanDOMString &theString, const XalanDOMChar *theStringToAppend, XalanDOMString::size_type theStringToAppendLength=XalanDOMString::npos)
 Concatenate two strings. More...
 
XalanDOMString & xalanc::append (XalanDOMString &theString, const char *theStringToAppend, XalanDOMString::size_type theStringToAppendLength=XalanDOMString::npos)
 Concatenate two strings. More...
 
XalanDOMString & xalanc::append (XalanDOMString &theString, const XalanDOMChar theCharToAppend)
 Concatenate a string and a character. More...
 
XalanDOMString & xalanc::append (XalanDOMString &theString, char theCharToAppend)
 Concatenate a string and a character. More...
 
XalanDOMString & xalanc::insert (XalanDOMString &theString, XalanDOMString::size_type thePosition, const XalanDOMString &theStringToInsert)
 Insert a string into another string. More...
 
XalanDOMString & xalanc::insert (XalanDOMString &theString, XalanDOMString::size_type thePosition, const XalanDOMChar *theStringToInsert)
 Insert a string into another string. More...
 
 xalanc::trim (const XalanDOMString &theString, XalanDOMString &theResult)
 Remove leading and trailing whitespace. More...
 
void xalanc::clear (XalanDOMString &theString)
 Remove all elements from target string. More...
 
void xalanc::erase (XalanDOMString &theString)
 Remove all elements from target string. More...
 
void xalanc::releaseMemory (XalanDOMString &theString, MemoryManager &theManager)
 Remove all elements from target string and frees all allocated memory. More...
 
 xalanc::CopyWideStringToVector (const XalanDOMChar *theString, CharVectorType &theVector)
 
 xalanc::CopyStringToVector (const char *theString, CharVectorType &theVector)
 
 xalanc::MakeXalanDOMCharVector (const char *data, XalanDOMCharVectorType &result, bool fTranscode=true)
 Utility function to make a null-terminated vector of XMLChs, from a null-terminated array of chars, via transcoding, if requested. More...
 
 xalanc::MakeXalanDOMCharVector (const XalanDOMChar *data, XalanDOMCharVectorType &result)
 Utility function to make a null-terminated vector of XMLChs, from a null-terminated array of XalanDOMChar. More...
 
XalanDOMCharVectorType & xalanc::MakeXalanDOMCharVector (const XalanDOMString &data, XalanDOMCharVectorType &result)
 Utility function to make a null-terminated vector of XMLChs, from a XalanDOMString. More...
 
 xalanc::isXMLWhitespace (const XalanDOMString &string)
 Determines if the string contains only whitespace. More...
 
 xalanc::isXMLWhitespace (const XalanDOMChar ch[], XalanDOMString::size_type start, XalanDOMString::size_type length)
 Determines if a range in an array contains only whitespace. More...
 
bool xalanc::isXMLWhitespace (const XalanDOMChar *theString)
 Determines if a null-terminated string contains only whitespace. More...