00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057 #ifndef _OSXMLString_H_
00058 #define _OSXMLString_H_
00059
00060 #include "rtxersrc/rtSAXDefs.h"
00061 #include "rtxersrc/asn1xer.h"
00062
00063
00064
00065 class EXTERNXER OSXMLString {
00066 public:
00067 static unsigned int stringLen (const char* const str);
00068 static unsigned int stringLen (const XMLCHAR16* const str);
00069
00070 static XMLCHAR* replicate (const XMLCHAR* const str);
00071
00072 static XMLCHAR* transcode (const char* const str);
00073
00074 static char* transcode (const XMLCHAR16* const toTranscode);
00075
00076 static int compareString (const XMLCHAR* const str1,
00077 const XMLCHAR* const str2);
00078
00079 static XMLCHAR* catString (XMLCHAR* destStr, int destStrSize,
00080 const XMLCHAR* const str);
00081
00082 #ifdef XML_UNICODE
00083 static XMLCHAR* catString (XMLCHAR* destStr, int destStrSize,
00084 const char* const str);
00085 #else
00086 static XMLCHAR* catString (XMLCHAR* destStr, int destStrSize,
00087 const XMLCHAR16* const str);
00088 #endif
00089
00090 static int stringUTF8Len (const unsigned char* utf8Str, int strLen);
00091
00092 static XMLCHAR16* transUTF8 (const unsigned char* utf8Str,
00093 int *strSize, XMLCHAR16* destBuf, int destBufSize);
00094
00095 static XMLCHAR* safeTranscode (const XMLCHAR16* str, int* strSize,
00096 XMLCHAR* staticBuf, int bufSize);
00097
00098 #ifndef XML_UNICODE
00099 static XMLCHAR16* safeTranscode (const XMLCHAR* str, int* strSize,
00100 XMLCHAR16* staticBuf, int bufSize);
00101 #endif
00102 static const XMLCHAR* zeroLenString ();
00103 };
00104
00105 #endif // _OSXMLString_H_