source: NonGTP/Xerces/xerces/doc/html/apiDocs/XMLString_8hpp-source.html @ 358

Revision 358, 80.0 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
1<HTML><HEAD><SCRIPT language="JavaScript" src="../resources/script.js" type="text/javascript"></SCRIPT><TITLE>XMLString.hpp Source File</TITLE><link href="XercesApi.css" rel="stylesheet" type="text/css"></HEAD><BODY alink="#ff0000" bgcolor="#ffffff" leftmargin="4" link="#0000ff" marginheight="4" marginwidth="4" text="#000000" topmargin="4" vlink="#0000aa"><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD align="left" height="60" rowspan="3" valign="top" width="135"><IMG border="0" height="60" hspace="0" src="../resources/logo.gif" vspace="0" width="135"></TD><TD align="left" colspan="4" height="5" valign="top" width="456"><IMG border="0" height="5" hspace="0" src="../resources/line.gif" vspace="0" width="456"></TD><TD align="left" height="60" rowspan="3" valign="top" width="29"><IMG border="0" height="60" hspace="0" src="../resources/right.gif" vspace="0" width="29"></TD></TR><TR><TD align="left" bgcolor="#0086b2" colspan="4" height="35" valign="top" width="456"><IMG alt="" border="0" height="35" hspace="0" src="../graphics/api-header.jpg" vspace="0" width="456"></TD></TR><TR><TD align="left" height="20" valign="top" width="168"><IMG border="0" height="20" hspace="0" src="../resources/bottom.gif" vspace="0" width="168"></TD><TD align="left" height="20" valign="top" width="96"><A href="http://xml.apache.org/" onMouseOut="rolloverOff('xml');" onMouseOver="rolloverOn('xml');" target="new"><IMG alt="http://xml.apache.org/" border="0" height="20" hspace="0" name="xml" onLoad="rolloverLoad('xml','../resources/button-xml-hi.gif','../resources/button-xml-lo.gif');" src="../resources/button-xml-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.apache.org/" onMouseOut="rolloverOff('asf');" onMouseOver="rolloverOn('asf');" target="new"><IMG alt="http://www.apache.org/" border="0" height="20" hspace="0" name="asf" onLoad="rolloverLoad('asf','../resources/button-asf-hi.gif','../resources/button-asf-lo.gif');" src="../resources/button-asf-lo.gif" vspace="0" width="96"></A></TD><TD align="left" height="20" valign="top" width="96"><A href="http://www.w3.org/" onMouseOut="rolloverOff('w3c');" onMouseOver="rolloverOn('w3c');" target="new"><IMG alt="http://www.w3.org/" border="0" height="20" hspace="0" name="w3c" onLoad="rolloverLoad('w3c','../resources/button-w3c-hi.gif','../resources/button-w3c-lo.gif');" src="../resources/button-w3c-lo.gif" vspace="0" width="96"></A></TD></TR></TABLE><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD align="left" valign="top" width="120"><IMG border="0" height="14" hspace="0" src="../resources/join.gif" vspace="0" width="120"><BR>
2  <A href="../../index.html" onMouseOut="rolloverOff('side-ext-2');" onMouseOver="rolloverOn('side-ext-2');"><IMG alt="Home" border="0" height="12" hspace="0" name="side-ext-2" onLoad="rolloverLoad('side-ext-2','../graphics/ext-2-label-2.jpg','../graphics/ext-2-label-3.jpg');" src="../graphics/ext-2-label-3.jpg" vspace="0" width="120"></A><BR>
3
4  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
5
6  <A href="../index.html" onMouseOut="rolloverOff('side-index');" onMouseOver="rolloverOn('side-index');"><IMG alt="Readme" border="0" height="12" hspace="0" name="side-index" onLoad="rolloverLoad('side-index','../graphics/index-label-2.jpg','../graphics/index-label-3.jpg');" src="../graphics/index-label-3.jpg" vspace="0" width="120"></A><BR>
7  <A href="../releases.html" onMouseOut="rolloverOff('side-releases');" onMouseOver="rolloverOn('side-releases');"><IMG alt="Release Info" border="0" height="12" hspace="0" name="side-releases" onLoad="rolloverLoad('side-releases','../graphics/releases-label-2.jpg','../graphics/releases-label-3.jpg');" src="../graphics/releases-label-3.jpg" vspace="0" width="120"></A><BR>
8  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
9  <A href="../install.html" onMouseOut="rolloverOff('side-install');" onMouseOver="rolloverOn('side-install');"><IMG alt="Installation" border="0" height="12" hspace="0" name="side-install" onLoad="rolloverLoad('side-install','../graphics/install-label-2.jpg','../graphics/install-label-3.jpg');" src="../graphics/install-label-3.jpg" vspace="0" width="120"></A><BR>
10  <A href="http://xml.apache.org/dist/xerces-c/" onMouseOut="rolloverOff('side-ext-18');" onMouseOver="rolloverOn('side-ext-18');"><IMG alt="Download" border="0" height="12" hspace="0" name="side-ext-18" onLoad="rolloverLoad('side-ext-18','../graphics/ext-18-label-2.jpg','../graphics/ext-18-label-3.jpg');" src="../graphics/ext-18-label-3.jpg" vspace="0" width="120"></A><BR>
11  <A href="../build.html" onMouseOut="rolloverOff('side-build');" onMouseOver="rolloverOn('side-build');"><IMG alt="Build" border="0" height="12" hspace="0" name="side-build" onLoad="rolloverLoad('side-build','../graphics/build-label-2.jpg','../graphics/build-label-3.jpg');" src="../graphics/build-label-3.jpg" vspace="0" width="120"></A><BR>
12
13  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
14  <A href="../faqs.html" onMouseOut="rolloverOff('side-faqs');" onMouseOver="rolloverOn('side-faqs');"><IMG alt="FAQs" border="0" height="12" hspace="0" name="side-faqs" onLoad="rolloverLoad('side-faqs','../graphics/faqs-label-2.jpg','../graphics/faqs-label-3.jpg');" src="../graphics/faqs-label-3.jpg" vspace="0" width="120"></A><BR> 
15  <A href="../samples.html" onMouseOut="rolloverOff('side-samples');" onMouseOver="rolloverOn('side-samples');"><IMG alt="Samples" border="0" height="12" hspace="0" name="side-samples" onLoad="rolloverLoad('side-samples','../graphics/samples-label-2.jpg','../graphics/samples-label-3.jpg');" src="../graphics/samples-label-3.jpg" vspace="0" width="120"></A><BR>
16  <A href="../api.html" onMouseOut="rolloverOff('side-api');" onMouseOver="rolloverOn('side-api');"><IMG alt="API Docs" border="0" height="12" hspace="0" name="side-api" onLoad="rolloverLoad('side-api','../graphics/api-label-2.jpg','../graphics/api-label-3.jpg');" src="../graphics/api-label-3.jpg" vspace="0" width="120"></A><BR> 
17
18  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR> 
19  <A href="../ApacheDOMC++Binding.html" onMouseOut="rolloverOff('side-ext-68');" onMouseOver="rolloverOn('side-ext-68');"><IMG alt="DOM C++ Binding" border="0" height="12" hspace="0" name="side-ext-68" onLoad="rolloverLoad('side-ext-68','../graphics/ext-68-label-2.jpg','../graphics/ext-68-label-3.jpg');" src="../graphics/ext-68-label-3.jpg" vspace="0" width="120"></A><BR>
20
21  <A href="../program.html" onMouseOut="rolloverOff('side-program');" onMouseOver="rolloverOn('side-program');"><IMG alt="Programming" border="0" height="12" hspace="0" name="side-program" onLoad="rolloverLoad('side-program','../graphics/program-label-2.jpg','../graphics/program-label-3.jpg');" src="../graphics/program-label-3.jpg" vspace="0" width="120"></A><BR>
22  <A href="../migrate.html" onMouseOut="rolloverOff('side-migrate');" onMouseOver="rolloverOn('side-migrate');"><IMG alt="Migration Guide" border="0" height="12" hspace="0" name="side-migrate" onLoad="rolloverLoad('side-migrate','../graphics/migrate-label-2.jpg','../graphics/migrate-label-3.jpg');" src="../graphics/migrate-label-3.jpg" vspace="0" width="120"></A><BR>
23
24  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
25
26  <A href="../feedback.html" onMouseOut="rolloverOff('side-feedback');" onMouseOver="rolloverOn('side-feedback');"><IMG alt="Feedback" border="0" height="12" hspace="0" name="side-feedback" onLoad="rolloverLoad('side-feedback','../graphics/feedback-label-2.jpg','../graphics/feedback-label-3.jpg');" src="../graphics/feedback-label-3.jpg" vspace="0" width="120"></A><BR>
27  <A href="../bug-report.html" onMouseOut="rolloverOff('side-bug-report');" onMouseOver="rolloverOn('side-bug-report');"><IMG alt="Bug-Reporting" border="0" height="12" hspace="0" name="side-bug-report" onLoad="rolloverLoad('side-bug-report','../graphics/bug-report-label-2.jpg','../graphics/bug-report-label-3.jpg');" src="../graphics/bug-report-label-3.jpg" vspace="0" width="120"></A><BR> 
28  <A href="../pdf.html" onMouseOut="rolloverOff('side-pdf');" onMouseOver="rolloverOn('side-pdf');"><IMG alt="PDF Document" border="0" height="12" hspace="0" name="side-pdf" onLoad="rolloverLoad('side-pdf','../graphics/pdf-label-2.jpg','../graphics/pdf-label-3.jpg');" src="../graphics/pdf-label-3.jpg" vspace="0" width="120"></A><BR>
29
30  <IMG border="0" height="6" hspace="0" src="../resources/separator.gif" vspace="0" width="120"><BR>
31
32  <A href="http://xml.apache.org/websrc/cvsweb.cgi/xml-xerces/c/" onMouseOut="rolloverOff('side-ext-100');" onMouseOver="rolloverOn('side-ext-100');"><IMG alt="CVS Repository" border="0" height="12" hspace="0" name="side-ext-100" onLoad="rolloverLoad('side-ext-100','../graphics/ext-100-label-2.jpg','../graphics/ext-100-label-3.jpg');" src="../graphics/ext-100-label-3.jpg" vspace="0" width="120"></A><BR>
33
34  <A href="http://marc.theaimsgroup.com/?l=xerces-c-dev" onMouseOut="rolloverOff('side-ext-102');" onMouseOver="rolloverOn('side-ext-102');"><IMG alt="Mail Archive" border="0" height="12" hspace="0" name="side-ext-102" onLoad="rolloverLoad('side-ext-102','../graphics/ext-102-label-2.jpg','../graphics/ext-102-label-3.jpg');" src="../graphics/ext-102-label-3.jpg" vspace="0" width="120"></A><BR>
35
36
37<IMG border="0" height="14" hspace="0" src="../resources/close.gif" vspace="0" width="120"><BR></TD><TD align="left" valign="top" width="500"><TABLE border="0" cellpadding="3" cellspacing="0"><TR><TD>
38    <TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="#FFFFFF" colspan="2" width="494"><TABLE border="0" cellpadding="0" cellspacing="0" width="494"><TR><TD bgcolor="#039acc" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#039acc" height="1" width="492"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#039acc" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#0086b2" width="492"><FONT color="#ffffff" face="arial,helvetica,sanserif" size="+1"><IMG border="0" height="2" hspace="0" src="../resources/void.gif" vspace="0" width="2"><B>API Docs for SAX and DOM</B></FONT></TD><TD bgcolor="#017299" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR><TR><TD bgcolor="#0086b2" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD><TD bgcolor="#017299" height="1" width="492"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="492"></TD><TD bgcolor="#017299" height="1" width="1"><IMG border="0" height="1" hspace="0" src="../resources/void.gif" vspace="0" width="1"></TD></TR></TABLE></TD></TR><TR><TD width="10">&nbsp;</TD><TD width="484"><FONT color="#000000" face="arial,helvetica,sanserif">
39
40            <P>
41<!-- Generated by Doxygen 1.2.14 -->
42<center>
43<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; </center>
44<hr><h1>XMLString.hpp</h1><a href="XMLString_8hpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <font class="comment">/*</font>
4500002 <font class="comment"> * Copyright 1999-2004 The Apache Software Foundation.</font>
4600003 <font class="comment"> * </font>
4700004 <font class="comment"> * Licensed under the Apache License, Version 2.0 (the "License");</font>
4800005 <font class="comment"> * you may not use this file except in compliance with the License.</font>
4900006 <font class="comment"> * You may obtain a copy of the License at</font>
5000007 <font class="comment"> * </font>
5100008 <font class="comment"> *      http://www.apache.org/licenses/LICENSE-2.0</font>
5200009 <font class="comment"> * </font>
5300010 <font class="comment"> * Unless required by applicable law or agreed to in writing, software</font>
5400011 <font class="comment"> * distributed under the License is distributed on an "AS IS" BASIS,</font>
5500012 <font class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</font>
5600013 <font class="comment"> * See the License for the specific language governing permissions and</font>
5700014 <font class="comment"> * limitations under the License.</font>
5800015 <font class="comment"> */</font>
5900016
6000017 <font class="comment">/*</font>
6100018 <font class="comment"> * $Log: XMLString.hpp,v $</font>
6200019 <font class="comment"> * Revision 1.28  2004/09/08 13:56:24  peiyongz</font>
6300020 <font class="comment"> * Apache License Version 2.0</font>
6400021 <font class="comment"> *</font>
6500022 <font class="comment"> * Revision 1.27  2004/09/02 19:08:09  cargilld</font>
6600023 <font class="comment"> * Fix API Doc warning message</font>
6700024 <font class="comment"> *</font>
6800025 <font class="comment"> * Revision 1.26  2004/08/11 16:07:27  peiyongz</font>
6900026 <font class="comment"> * isValidNOTATION</font>
7000027 <font class="comment"> *</font>
7100028 <font class="comment"> * Revision 1.25  2004/05/25 18:11:32  peiyongz</font>
7200029 <font class="comment"> * removeChar() added</font>
7300030 <font class="comment"> *</font>
7400031 <font class="comment"> * Revision 1.24  2004/03/10 17:35:17  amassari</font>
7500032 <font class="comment"> * Fix documentation for binToText (bug# 9207)</font>
7600033 <font class="comment"> *</font>
7700034 <font class="comment"> * Revision 1.23  2003/12/24 15:24:13  cargilld</font>
7800035 <font class="comment"> * More updates to memory management so that the static memory manager.</font>
7900036 <font class="comment"> *</font>
8000037 <font class="comment"> * Revision 1.22  2003/12/17 20:00:49  cargilld</font>
8100038 <font class="comment"> * Update for memory management so that the static memory manager (one</font>
8200039 <font class="comment"> * used to call Initialize) is only for static data.</font>
8300040 <font class="comment"> *</font>
8400041 <font class="comment"> * Revision 1.21  2003/12/17 00:18:35  cargilld</font>
8500042 <font class="comment"> * Update to memory management so that the static memory manager (one used to call Initialize) is only for static data.</font>
8600043 <font class="comment"> *</font>
8700044 <font class="comment"> * Revision 1.20  2003/10/02 11:07:26  gareth</font>
8800045 <font class="comment"> * Made the non-memory manager version of replicate not inlined. Updated the documentation for the memory manager versions so they don't tell you you should call release.</font>
8900046 <font class="comment"> *</font>
9000047 <font class="comment"> * Revision 1.19  2003/10/01 00:22:20  knoaman</font>
9100048 <font class="comment"> * Add a lastIndexOf method that takes the string length as one of the params.</font>
9200049 <font class="comment"> *</font>
9300050 <font class="comment"> * Revision 1.18  2003/08/25 20:39:47  neilg</font>
9400051 <font class="comment"> * fix XMLString::findAny(...) docs so that they match what the method actually does (and has done since time immemorial)</font>
9500052 <font class="comment"> *</font>
9600053 <font class="comment"> * Revision 1.17  2003/05/18 14:02:05  knoaman</font>
9700054 <font class="comment"> * Memory manager implementation: pass per instance manager.</font>
9800055 <font class="comment"> *</font>
9900056 <font class="comment"> * Revision 1.16  2003/05/15 19:07:46  knoaman</font>
10000057 <font class="comment"> * Partial implementation of the configurable memory manager.</font>
10100058 <font class="comment"> *</font>
10200059 <font class="comment"> * Revision 1.15  2003/04/21 20:07:05  knoaman</font>
10300060 <font class="comment"> * Performance: use memcpy in moveChars and replicate.</font>
10400061 <font class="comment"> *</font>
10500062 <font class="comment"> * Revision 1.14  2003/02/25 16:42:31  tng</font>
10600063 <font class="comment"> * [Bug 7072] Documentation for XMLString::transcode states invalid return value.</font>
10700064 <font class="comment"> *</font>
10800065 <font class="comment"> * Revision 1.13  2003/02/05 18:50:56  tng</font>
10900066 <font class="comment"> * [Bug 11915] Utility for freeing memory.</font>
11000067 <font class="comment"> *</font>
11100068 <font class="comment"> * Revision 1.12  2003/01/24 23:16:33  peiyongz</font>
11200069 <font class="comment"> * removeWS() added;</font>
11300070 <font class="comment"> *</font>
11400071 <font class="comment"> * Revision 1.11  2002/12/20 22:10:21  tng</font>
11500072 <font class="comment"> * XML 1.1</font>
11600073 <font class="comment"> *</font>
11700074 <font class="comment"> * Revision 1.10  2002/12/18 14:17:54  gareth</font>
11800075 <font class="comment"> * Fix to bug #13438. When you eant a vector that calls delete[] on its members you should use RefArrayVectorOf.</font>
11900076 <font class="comment"> *</font>
12000077 <font class="comment"> * Revision 1.9  2002/12/04 02:32:43  knoaman</font>
12100078 <font class="comment"> * #include cleanup.</font>
12200079 <font class="comment"> *</font>
12300080 <font class="comment"> * Revision 1.8  2002/11/05 17:42:39  peiyongz</font>
12400081 <font class="comment"> * equals( const char* const, const char* const)</font>
12500082 <font class="comment"> *</font>
12600083 <font class="comment"> * Revision 1.7  2002/11/04 15:22:05  tng</font>
12700084 <font class="comment"> * C++ Namespace Support.</font>
12800085 <font class="comment"> *</font>
12900086 <font class="comment"> * Revision 1.6  2002/10/01 19:45:22  tng</font>
13000087 <font class="comment"> * Performance in XMLString::equals, only need to check one string for null as they are equal already.</font>
13100088 <font class="comment"> *</font>
13200089 <font class="comment"> * Revision 1.5  2002/09/24 19:41:21  tng</font>
13300090 <font class="comment"> * New inline function equals that is modified from compareString but simply return true or false.</font>
13400091 <font class="comment"> *</font>
13500092 <font class="comment"> * Revision 1.4  2002/09/23 18:42:18  tng</font>
13600093 <font class="comment"> * DOM L3: Support baseURI.   Add utility fixURI to transform an absolute path filename to standard URI form.</font>
13700094 <font class="comment"> *</font>
13800095 <font class="comment"> * Revision 1.3  2002/08/27 19:24:43  peiyongz</font>
13900096 <font class="comment"> * Bug#12087: patch from Thomas Ford (tom@decisionsoft.com)</font>
14000097 <font class="comment"> *</font>
14100098 <font class="comment"> * Revision 1.2  2002/02/20 18:17:02  tng</font>
14200099 <font class="comment"> * [Bug 5977] Warnings on generating apiDocs.</font>
14300100 <font class="comment"> *</font>
14400101 <font class="comment"> * Revision 1.1.1.1  2002/02/01 22:22:16  peiyongz</font>
14500102 <font class="comment"> * sane_include</font>
14600103 <font class="comment"> *</font>
14700104 <font class="comment"> * Revision 1.26  2001/08/10 16:23:06  peiyongz</font>
14800105 <font class="comment"> * isHex(), isAlphaNum(), isAllWhiteSpace() and patternMatch() Added</font>
14900106 <font class="comment"> *</font>
15000107 <font class="comment"> * Revision 1.25  2001/07/06 20:27:57  peiyongz</font>
15100108 <font class="comment"> * isValidaQName()</font>
15200109 <font class="comment"> *</font>
15300110 <font class="comment"> * Revision 1.24  2001/07/04 14:38:20  peiyongz</font>
15400111 <font class="comment"> * IDDatatypeValidator: created</font>
15500112 <font class="comment"> * DatatypeValidatorFactory: IDDTV enabled</font>
15600113 <font class="comment"> * XMLString:isValidName(): to validate Name (XML [4][5])</font>
15700114 <font class="comment"> *</font>
15800115 <font class="comment"> * Revision 1.23  2001/06/13 14:07:55  peiyongz</font>
15900116 <font class="comment"> * isValidaEncName() to validate an encoding name (EncName)</font>
16000117 <font class="comment"> *</font>
16100118 <font class="comment"> * Revision 1.22  2001/05/23 15:44:51  tng</font>
16200119 <font class="comment"> * Schema: NormalizedString fix.  By Pei Yong Zhang.</font>
16300120 <font class="comment"> *</font>
16400121 <font class="comment"> * Revision 1.21  2001/05/11 13:26:31  tng</font>
16500122 <font class="comment"> * Copyright update.</font>
16600123 <font class="comment"> *</font>
16700124 <font class="comment"> * Revision 1.20  2001/05/09 18:43:30  tng</font>
16800125 <font class="comment"> * Add StringDatatypeValidator and BooleanDatatypeValidator.  By Pei Yong Zhang.</font>
16900126 <font class="comment"> *</font>
17000127 <font class="comment"> * Revision 1.19  2001/05/03 20:34:35  tng</font>
17100128 <font class="comment"> * Schema: SchemaValidator update</font>
17200129 <font class="comment"> *</font>
17300130 <font class="comment"> * Revision 1.18  2001/05/03 19:17:35  knoaman</font>
17400131 <font class="comment"> * TraverseSchema Part II.</font>
17500132 <font class="comment"> *</font>
17600133 <font class="comment"> * Revision 1.17  2001/03/21 21:56:13  tng</font>
17700134 <font class="comment"> * Schema: Add Schema Grammar, Schema Validator, and split the DTDValidator into DTDValidator, DTDScanner, and DTDGrammar.</font>
17800135 <font class="comment"> *</font>
17900136 <font class="comment"> * Revision 1.16  2001/03/02 20:52:46  knoaman</font>
18000137 <font class="comment"> * Schema: Regular expression - misc. updates for error messages,</font>
18100138 <font class="comment"> * and additions of new functions to XMLString class.</font>
18200139 <font class="comment"> *</font>
18300140 <font class="comment"> * Revision 1.15  2001/01/15 21:26:34  tng</font>
18400141 <font class="comment"> * Performance Patches by David Bertoni.</font>
18500142 <font class="comment"> *</font>
18600143 <font class="comment"> * Details: (see xerces-c-dev mailing Jan 14)</font>
18700144 <font class="comment"> * XMLRecognizer.cpp: the internal encoding string XMLUni::fgXMLChEncodingString</font>
18800145 <font class="comment"> * was going through this function numerous times.  As a result, the top hot-spot</font>
18900146 <font class="comment"> * for the parse was _wcsicmp().  The real problem is that the Microsofts wide string</font>
19000147 <font class="comment"> * functions are unbelievably slow.  For things like encodings, it might be</font>
19100148 <font class="comment"> * better to use a special comparison function that only considers a-z and</font>
19200149 <font class="comment"> * A-Z as characters with case.  This works since the character set for</font>
19300150 <font class="comment"> * encodings is limit to printable ASCII characters.</font>
19400151 <font class="comment"> *</font>
19500152 <font class="comment"> *  XMLScanner2.cpp: This also has some case-sensitive vs. insensitive compares.</font>
19600153 <font class="comment"> * They are also much faster.  The other tweak is to only make a copy of an attribute</font>
19700154 <font class="comment"> * string if it needs to be split.  And then, the strategy is to try to use a</font>
19800155 <font class="comment"> * stack-based buffer, rather than a dynamically-allocated one.</font>
19900156 <font class="comment"> *</font>
20000157 <font class="comment"> * SAX2XMLReaderImpl.cpp: Again, more case-sensitive vs. insensitive comparisons.</font>
20100158 <font class="comment"> *</font>
20200159 <font class="comment"> * KVStringPair.cpp &amp; hpp: By storing the size of the allocation, the storage can</font>
20300160 <font class="comment"> * likely be re-used many times, cutting down on dynamic memory allocations.</font>
20400161 <font class="comment"> *</font>
20500162 <font class="comment"> * XMLString.hpp: a more efficient implementation of stringLen().</font>
20600163 <font class="comment"> *</font>
20700164 <font class="comment"> * DTDValidator.cpp: another case of using a stack-based buffer when possible</font>
20800165 <font class="comment"> *</font>
20900166 <font class="comment"> * These patches made a big difference in parse time in some of our test</font>
21000167 <font class="comment"> * files, especially the ones are very attribute-heavy.</font>
21100168 <font class="comment"> *</font>
21200169 <font class="comment"> * Revision 1.14  2000/10/13 22:47:57  andyh</font>
21300170 <font class="comment"> * Fix bug (failure to null-terminate result) in XMLString::trim().</font>
21400171 <font class="comment"> * Patch contributed by Nadav Aharoni</font>
21500172 <font class="comment"> *</font>
21600173 <font class="comment"> * Revision 1.13  2000/04/12 18:42:15  roddey</font>
21700174 <font class="comment"> * Improved docs in terms of what 'max chars' means in the method</font>
21800175 <font class="comment"> * parameters.</font>
21900176 <font class="comment"> *</font>
22000177 <font class="comment"> * Revision 1.12  2000/04/06 19:42:51  rahulj</font>
22100178 <font class="comment"> * Clarified how big the target buffer should be in the API</font>
22200179 <font class="comment"> * documentation.</font>
22300180 <font class="comment"> *</font>
22400181 <font class="comment"> * Revision 1.11  2000/03/23 01:02:38  roddey</font>
22500182 <font class="comment"> * Updates to the XMLURL class to correct a lot of parsing problems</font>
22600183 <font class="comment"> * and to add support for the port number. Updated the URL tests</font>
22700184 <font class="comment"> * to test some of this new stuff.</font>
22800185 <font class="comment"> *</font>
22900186 <font class="comment"> * Revision 1.10  2000/03/20 23:00:46  rahulj</font>
23000187 <font class="comment"> * Moved the inline definition of stringLen before the first</font>
23100188 <font class="comment"> * use. This satisfied the HP CC compiler.</font>
23200189 <font class="comment"> *</font>
23300190 <font class="comment"> * Revision 1.9  2000/03/02 19:54:49  roddey</font>
23400191 <font class="comment"> * This checkin includes many changes done while waiting for the</font>
23500192 <font class="comment"> * 1.1.0 code to be finished. I can't list them all here, but a list is</font>
23600193 <font class="comment"> * available elsewhere.</font>
23700194 <font class="comment"> *</font>
23800195 <font class="comment"> * Revision 1.8  2000/02/24 20:05:26  abagchi</font>
23900196 <font class="comment"> * Swat for removing Log from API docs</font>
24000197 <font class="comment"> *</font>
24100198 <font class="comment"> * Revision 1.7  2000/02/16 18:51:52  roddey</font>
24200199 <font class="comment"> * Fixed some facts in the docs and reformatted the docs to stay within</font>
24300200 <font class="comment"> * a reasonable line width.</font>
24400201 <font class="comment"> *</font>
24500202 <font class="comment"> * Revision 1.6  2000/02/16 17:07:07  abagchi</font>
24600203 <font class="comment"> * Added API docs</font>
24700204 <font class="comment"> *</font>
24800205 <font class="comment"> * Revision 1.5  2000/02/06 07:48:06  rahulj</font>
24900206 <font class="comment"> * Year 2K copyright swat.</font>
25000207 <font class="comment"> *</font>
25100208 <font class="comment"> * Revision 1.4  2000/01/12 00:16:23  roddey</font>
25200209 <font class="comment"> * Changes to deal with multiply nested, relative pathed, entities and to deal</font>
25300210 <font class="comment"> * with the new URL class changes.</font>
25400211 <font class="comment"> *</font>
25500212 <font class="comment"> * Revision 1.3  1999/12/18 00:18:10  roddey</font>
25600213 <font class="comment"> * More changes to support the new, completely orthagonal support for</font>
25700214 <font class="comment"> * intrinsic encodings.</font>
25800215 <font class="comment"> *</font>
25900216 <font class="comment"> * Revision 1.2  1999/12/15 19:41:28  roddey</font>
26000217 <font class="comment"> * Support for the new transcoder system, where even intrinsic encodings are</font>
26100218 <font class="comment"> * done via the same transcoder abstraction as external ones.</font>
26200219 <font class="comment"> *</font>
26300220 <font class="comment"> * Revision 1.1.1.1  1999/11/09 01:05:52  twl</font>
26400221 <font class="comment"> * Initial checkin</font>
26500222 <font class="comment"> *</font>
26600223 <font class="comment"> * Revision 1.2  1999/11/08 20:45:21  rahul</font>
26700224 <font class="comment"> * Swat for adding in Product name and CVS comment log variable.</font>
26800225 <font class="comment"> *</font>
26900226 <font class="comment"> */</font>
27000227
27100228 <font class="preprocessor">#if !defined(XMLSTRING_HPP)</font>
272<a name="l00229"></a><a class="code" href="XMLString_8hpp.html#a0">00229</a> <font class="preprocessor"></font><font class="preprocessor">#define XMLSTRING_HPP</font>
27300230 <font class="preprocessor"></font>
27400231 <font class="preprocessor">#include &lt;xercesc/util/BaseRefVectorOf.hpp&gt;</font>
27500232 <font class="preprocessor">#include &lt;xercesc/framework/XMLBuffer.hpp&gt;</font>
27600233 <font class="preprocessor">#include &lt;<a class="code" href="MemoryManager_8hpp.html">xercesc/framework/MemoryManager.hpp</a>&gt;</font>
27700234 <font class="preprocessor">#include &lt;string.h&gt;</font>
27800235
27900236 <a class="code" href="XercesDefs_8hpp.html#a2">XERCES_CPP_NAMESPACE_BEGIN</a>
28000237
281<a name="l00238"></a><a class="code" href="XMLString_8hpp.html#a1">00238</a> <font class="keyword">class </font><a class="code" href="classXMLLCPTranscoder.html">XMLLCPTranscoder</a>;
282<a name="l00250"></a><a class="code" href="classXMLString.html">00250</a> <font class="keyword">class </font><a class="code" href="XercesDefs_8hpp.html#a8"></a> <a class="code" href="classXMLString.html">XMLString</a>
28300251 {
28400252 <font class="keyword">public</font>:
28500253     <font class="comment">/* Static methods for native character mode string manipulation */</font>
28600254
28700255
28800272     <font class="keyword">static</font> <font class="keywordtype">void</font> catString
28900273     (
29000274                 <font class="keywordtype">char</font>* <font class="keyword">const</font>     target
29100275         , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>     src
29200276     );
29300277
29400290     <font class="keyword">static</font> <font class="keywordtype">void</font> catString
29500291     (
29600292                 XMLCh* <font class="keyword">const</font>    target
29700293         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    src
29800294     );
29900296
30000310     <font class="keyword">static</font> <font class="keywordtype">int</font> compareIString
30100311     (
30200312         <font class="keyword">const</font>   <font class="keywordtype">char</font>* <font class="keyword">const</font>     str1
30300313         , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>     str2
30400314     );
30500315
30600326     <font class="keyword">static</font> <font class="keywordtype">int</font> compareIString
30700327     (
30800328         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    str1
30900329         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    str2
31000330     );
31100331
31200332
31300346     <font class="keyword">static</font> <font class="keywordtype">int</font> compareNString
31400347     (
31500348         <font class="keyword">const</font>   <font class="keywordtype">char</font>* <font class="keyword">const</font>     str1
31600349         , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>     str2
31700350         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    count
31800351     );
31900352
32000366     <font class="keyword">static</font> <font class="keywordtype">int</font> compareNString
32100367     (
32200368         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    str1
32300369         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    str2
32400370         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    count
32500371     );
32600372
32700373
32800387     <font class="keyword">static</font> <font class="keywordtype">int</font> compareNIString
32900388     (
33000389         <font class="keyword">const</font>   <font class="keywordtype">char</font>* <font class="keyword">const</font>     str1
33100390         , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>     str2
33200391         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    count
33300392     );
33400393
33500408     <font class="keyword">static</font> <font class="keywordtype">int</font> compareNIString
33600409     (
33700410         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    str1
33800411         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    str2
33900412         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    count
34000413     );
34100414
34200427     <font class="keyword">static</font> <font class="keywordtype">int</font> compareString
34300428     (
34400429         <font class="keyword">const</font>   <font class="keywordtype">char</font>* <font class="keyword">const</font>     str1
34500430         , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>     str2
34600431     );
34700432
34800444     <font class="keyword">static</font> <font class="keywordtype">int</font> compareString
34900445     (
35000446         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    str1
35100447         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    str2
35200448     );
35300449
35400458     <font class="keyword">static</font> <font class="keywordtype">bool</font> equals
35500459     (
35600460           <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    str1
35700461         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    str2
35800462     );
35900463
36000464     <font class="keyword">static</font> <font class="keywordtype">bool</font> equals
36100465     (
36200466           <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>    str1
36300467         , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>    str2
36400468     );
36500469
36600496     <font class="keyword">static</font> <font class="keywordtype">bool</font> regionMatches
36700497     (
36800498         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    str1
36900499         , <font class="keyword">const</font> <font class="keywordtype">int</font>             offset1
37000500         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    str2
37100501         , <font class="keyword">const</font> <font class="keywordtype">int</font>             offset2
37200502         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    charCount
37300503     );
37400504
37500532     <font class="keyword">static</font> <font class="keywordtype">bool</font> regionIMatches
37600533     (
37700534         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    str1
37800535         , <font class="keyword">const</font> <font class="keywordtype">int</font>             offset1
37900536         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    str2
38000537         , <font class="keyword">const</font> <font class="keywordtype">int</font>             offset2
38100538         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    charCount
38200539     );
38300541
38400554     <font class="keyword">static</font> <font class="keywordtype">void</font> copyString
38500555     (
38600556                 <font class="keywordtype">char</font>* <font class="keyword">const</font>     target
38700557         , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>     src
38800558     );
38900559
39000570     <font class="keyword">static</font> <font class="keywordtype">void</font> copyString
39100571     (
39200572                 XMLCh* <font class="keyword">const</font>    target
39300573         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    src
39400574     );
39500575
39600588     <font class="keyword">static</font> <font class="keywordtype">bool</font> copyNString
39700589     (
39800590                 XMLCh* <font class="keyword">const</font>    target
39900591         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    src
40000592         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    maxChars
40100593     );
40200595
40300605     <font class="keyword">static</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> hash
40400606     (
40500607         <font class="keyword">const</font>   <font class="keywordtype">char</font>* <font class="keyword">const</font>     toHash
40600608         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    hashModulus
40700609         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
40800610     );
40900611
41000619     <font class="keyword">static</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> hash
41100620     (
41200621         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    toHash
41300622         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    hashModulus
41400623         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
41500624     );
41600625
41700635     <font class="keyword">static</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> hashN
41800636     (
41900637         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    toHash
42000638         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    numChars
42100639         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    hashModulus
42200640         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
42300641     );
42400642
42500644
42600655     <font class="keyword">static</font> <font class="keywordtype">int</font> indexOf(<font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font> toSearch, <font class="keyword">const</font> <font class="keywordtype">char</font> ch);
42700656
42800665     <font class="keyword">static</font> <font class="keywordtype">int</font> indexOf(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> toSearch, <font class="keyword">const</font> XMLCh ch);
42900666
43000678     <font class="keyword">static</font> <font class="keywordtype">int</font> indexOf
43100679     (
43200680         <font class="keyword">const</font>   <font class="keywordtype">char</font>* <font class="keyword">const</font>     toSearch
43300681         , <font class="keyword">const</font> <font class="keywordtype">char</font>            chToFind
43400682         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    fromIndex
43500683         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
43600684     );
43700685
43800697     <font class="keyword">static</font> <font class="keywordtype">int</font> indexOf
43900698     (
44000699         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    toSearch
44100700         , <font class="keyword">const</font> XMLCh           chToFind
44200701         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    fromIndex
44300702         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
44400703     );
44500704
44600713     <font class="keyword">static</font> <font class="keywordtype">int</font> lastIndexOf(<font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font> toSearch, <font class="keyword">const</font> <font class="keywordtype">char</font> ch);
44700714
44800723     <font class="keyword">static</font> <font class="keywordtype">int</font> lastIndexOf(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> toSearch, <font class="keyword">const</font> XMLCh ch);
44900724
45000734     <font class="keyword">static</font> <font class="keywordtype">int</font> lastIndexOf
45100735     (
45200736         <font class="keyword">const</font> XMLCh ch
45300737         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> toSearch
45400738         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> toSearchLen
45500739     );
45600740
45700752     <font class="keyword">static</font> <font class="keywordtype">int</font> lastIndexOf
45800753     (
45900754         <font class="keyword">const</font>   <font class="keywordtype">char</font>* <font class="keyword">const</font>     toSearch
46000755         , <font class="keyword">const</font> <font class="keywordtype">char</font>            chToFind
46100756         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    fromIndex
46200757         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
46300758     );
46400759
46500771     <font class="keyword">static</font> <font class="keywordtype">int</font> lastIndexOf
46600772     (
46700773         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    toSearch
46800774         , <font class="keyword">const</font> XMLCh           ch
46900775         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    fromIndex
47000776         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
47100777     );
47200779
47300787     <font class="keyword">static</font> <font class="keywordtype">void</font> moveChars
47400788     (
47500789                 XMLCh* <font class="keyword">const</font>    targetStr
47600790         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    srcStr
47700791         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    count
47800792     );
47900793
48000795
48100807     <font class="keyword">static</font> <font class="keywordtype">void</font> subString
48200808     (
48300809                 <font class="keywordtype">char</font>* <font class="keyword">const</font>    targetStr
48400810         , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>    srcStr
48500811         , <font class="keyword">const</font> <font class="keywordtype">int</font>            startIndex
48600812         , <font class="keyword">const</font> <font class="keywordtype">int</font>            endIndex
48700813         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
48800814     );
48900815
49000825     <font class="keyword">static</font> <font class="keywordtype">void</font> subString
49100826     (
49200827                 XMLCh* <font class="keyword">const</font>    targetStr
49300828         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    srcStr
49400829         , <font class="keyword">const</font> <font class="keywordtype">int</font>             startIndex
49500830         , <font class="keyword">const</font> <font class="keywordtype">int</font>             endIndex
49600831         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
49700832     );
49800833
49900835
50000847     <font class="keyword">static</font> <font class="keywordtype">char</font>* replicate(<font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font> toRep);
50100848
50200857     <font class="keyword">static</font> <font class="keywordtype">char</font>* replicate(<font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font> toRep,
50300858                            <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager);
50400859
50500869     <font class="keyword">static</font> XMLCh* replicate(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> toRep);
50600870
50700879     <font class="keyword">static</font> XMLCh* replicate(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> toRep,
50800880                             <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager);
50900881
51000883
51100892     <font class="keyword">static</font> <font class="keywordtype">bool</font> startsWith
51200893     (
51300894         <font class="keyword">const</font>   <font class="keywordtype">char</font>* <font class="keyword">const</font>     toTest
51400895         , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>     prefix
51500896     );
51600897
51700904     <font class="keyword">static</font> <font class="keywordtype">bool</font> startsWith
51800905     (
51900906         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    toTest
52000907         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    prefix
52100908     );
52200909
52300918     <font class="keyword">static</font> <font class="keywordtype">bool</font> startsWithI
52400919     (
52500920         <font class="keyword">const</font>   <font class="keywordtype">char</font>* <font class="keyword">const</font>     toTest
52600921         , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>     prefix
52700922     );
52800923
52900933     <font class="keyword">static</font> <font class="keywordtype">bool</font> startsWithI
53000934     (
53100935         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    toTest
53200936         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    prefix
53300937     );
53400938
53500945     <font class="keyword">static</font> <font class="keywordtype">bool</font> endsWith
53600946     (
53700947         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    toTest
53800948         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    suffix
53900949     );
54000950
54100951
54200960     <font class="keyword">static</font> <font class="keyword">const</font> XMLCh* findAny
54300961     (
54400962         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    toSearch
54500963         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    searchList
54600964     );
54700965
54800974     <font class="keyword">static</font> XMLCh* findAny
54900975     (
55000976                 XMLCh* <font class="keyword">const</font>    toSearch
55100977         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    searchList
55200978     );
55300979
55400986     <font class="keyword">static</font> <font class="keywordtype">int</font> patternMatch
55500987     (
55600988           <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    toSearch
55700989         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    pattern
55800990     );
55900991
56000996     <font class="keyword">static</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> stringLen(<font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font> src);
56100997
56201002     <font class="keyword">static</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> stringLen(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> src);
56301003
56401011     <font class="keyword">static</font> <font class="keywordtype">bool</font> isValidNOTATION(<font class="keyword">const</font> XMLCh*         <font class="keyword">const</font> name
56501012                               ,       <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>);
56601013
56701021     <font class="keyword">static</font> <font class="keywordtype">bool</font> isValidNCName(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> name);
56801022
56901030     <font class="keyword">static</font> <font class="keywordtype">bool</font> isValidName(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> name);
57001031
57101037     <font class="keyword">static</font> <font class="keywordtype">bool</font> isValidEncName(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> name);
57201038
57301046     <font class="keyword">static</font> <font class="keywordtype">bool</font> isValidQName(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> name);
57401047
57501054     <font class="keyword">static</font> <font class="keywordtype">bool</font> isAlpha(XMLCh <font class="keyword">const</font> theChar);
57601055
57701061     <font class="keyword">static</font> <font class="keywordtype">bool</font> isDigit(XMLCh <font class="keyword">const</font> theChar);
57801062
57901068     <font class="keyword">static</font> <font class="keywordtype">bool</font> isAlphaNum(XMLCh <font class="keyword">const</font> theChar);
58001069
58101075     <font class="keyword">static</font> <font class="keywordtype">bool</font> isHex(XMLCh <font class="keyword">const</font> theChar);
58201076
58301084     <font class="keyword">static</font> <font class="keywordtype">bool</font> isAllWhiteSpace(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> toCheck);
58401085
58501091     <font class="keyword">static</font> <font class="keywordtype">bool</font> isInList(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> toFind, <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> enumList);
58601092
58701094
58801097
58901109     <font class="keyword">static</font> <font class="keywordtype">void</font> binToText
59001110     (
59101111         <font class="keyword">const</font>   <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    toFormat
59201112         ,       <font class="keywordtype">char</font>* <font class="keyword">const</font>     toFill
59301113         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    maxChars
59401114         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    radix
59501115         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
59601116     );
59701117
59801129     <font class="keyword">static</font> <font class="keywordtype">void</font> binToText
59901130     (
60001131         <font class="keyword">const</font>   <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    toFormat
60101132         ,       XMLCh* <font class="keyword">const</font>    toFill
60201133         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    maxChars
60301134         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    radix
60401135         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
60501136     );
60601137
60701149     <font class="keyword">static</font> <font class="keywordtype">void</font> binToText
60801150     (
60901151         <font class="keyword">const</font>   <font class="keywordtype">unsigned</font> <font class="keywordtype">long</font>   toFormat
61001152         ,       <font class="keywordtype">char</font>* <font class="keyword">const</font>     toFill
61101153         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    maxChars
61201154         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    radix
61301155         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
61401156     );
61501157
61601169     <font class="keyword">static</font> <font class="keywordtype">void</font> binToText
61701170     (
61801171         <font class="keyword">const</font>   <font class="keywordtype">unsigned</font> <font class="keywordtype">long</font>   toFormat
61901172         ,       XMLCh* <font class="keyword">const</font>    toFill
62001173         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    maxChars
62101174         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    radix
62201175         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
62301176     );
62401177
62501189     <font class="keyword">static</font> <font class="keywordtype">void</font> binToText
62601190     (
62701191         <font class="keyword">const</font>   <font class="keywordtype">long</font>            toFormat
62801192         ,       <font class="keywordtype">char</font>* <font class="keyword">const</font>     toFill
62901193         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    maxChars
63001194         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    radix
63101195         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
63201196     );
63301197
63401209     <font class="keyword">static</font> <font class="keywordtype">void</font> binToText
63501210     (
63601211         <font class="keyword">const</font>   <font class="keywordtype">long</font>            toFormat
63701212         ,       XMLCh* <font class="keyword">const</font>    toFill
63801213         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    maxChars
63901214         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    radix
64001215         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
64101216     );
64201217
64301229     <font class="keyword">static</font> <font class="keywordtype">void</font> binToText
64401230     (
64501231         <font class="keyword">const</font>   <font class="keywordtype">int</font>             toFormat
64601232         ,       <font class="keywordtype">char</font>* <font class="keyword">const</font>     toFill
64701233         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    maxChars
64801234         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    radix
64901235         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
65001236     );
65101237
65201249     <font class="keyword">static</font> <font class="keywordtype">void</font> binToText
65301250     (
65401251         <font class="keyword">const</font>   <font class="keywordtype">int</font>             toFormat
65501252         ,       XMLCh* <font class="keyword">const</font>    toFill
65601253         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    maxChars
65701254         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    radix
65801255         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
65901256     );
66001257
66101269     <font class="keyword">static</font> <font class="keywordtype">bool</font> textToBin
66201270     (
66301271         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    toConvert
66401272         ,       <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>&amp;   toFill
66501273         ,       <a class="code" href="classMemoryManager.html">MemoryManager</a>*  <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
66601274     );
66701275
66801289     <font class="keyword">static</font> <font class="keywordtype">int</font> parseInt
66901290     (
67001291         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    toConvert
67101292       , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>    manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
67201293     );
67301294
67401300     <font class="keyword">static</font> <font class="keywordtype">void</font> cut
67501301     (
67601302                 XMLCh* <font class="keyword">const</font>    toCutFrom
67701303         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    count
67801304     );
67901305
68001316     <font class="keyword">static</font> <font class="keywordtype">char</font>* transcode
68101317     (
68201318         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    toTranscode
68301319     );
68401320     <font class="keyword">static</font> <font class="keywordtype">char</font>* transcode
68501321     (
68601322         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>         toTranscode
68701323         ,       <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager
68801324     );
68901325
69001341     <font class="keyword">static</font> <font class="keywordtype">bool</font> transcode
69101342     (
69201343         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    toTranscode
69301344         ,       <font class="keywordtype">char</font>* <font class="keyword">const</font>     toFill
69401345         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    maxChars
69501346         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
69601347     );
69701348
69801359     <font class="keyword">static</font> XMLCh* transcode
69901360     (
70001361         <font class="keyword">const</font>   <font class="keywordtype">char</font>* <font class="keyword">const</font>     toTranscode
70101362     );
70201363     <font class="keyword">static</font> XMLCh* transcode
70301364     (
70401365         <font class="keyword">const</font>   <font class="keywordtype">char</font>* <font class="keyword">const</font>          toTranscode
70501366         ,       <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager
70601367     );
70701368
70801379     <font class="keyword">static</font> <font class="keywordtype">bool</font> transcode
70901380     (
71001381         <font class="keyword">const</font>   <font class="keywordtype">char</font>* <font class="keyword">const</font>     toTranscode
71101382         ,       XMLCh* <font class="keyword">const</font>    toFill
71201383         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    maxChars
71301384         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
71401385     );
71501386
71601392     <font class="keyword">static</font> <font class="keywordtype">void</font> trim(<font class="keywordtype">char</font>* <font class="keyword">const</font> toTrim);
71701393
71801399     <font class="keyword">static</font> <font class="keywordtype">void</font> trim(XMLCh* <font class="keyword">const</font> toTrim);
71901400
72001408     <font class="keyword">static</font> BaseRefVectorOf&lt;XMLCh&gt;* tokenizeString(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> tokenizeSrc
72101409                                         , <a class="code" href="classMemoryManager.html">MemoryManager</a>*       <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>);
72201410
72301412
72401423     <font class="keyword">static</font> XMLCh* makeUName
72501424     (
72601425         <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    pszURI
72701426         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    pszName     
72801427     );
72901428
73001445     <font class="keyword">static</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> replaceTokens
73101446     (
73201447                 XMLCh* <font class="keyword">const</font>    errText
73301448         , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>    maxChars
73401449         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    text1
73501450         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    text2
73601451         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    text3
73701452         , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    text4
73801453         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>
73901454     );
74001455
74101460     <font class="keyword">static</font> <font class="keywordtype">void</font> upperCase(XMLCh* <font class="keyword">const</font> toUpperCase);
74201461
74301466     <font class="keyword">static</font> <font class="keywordtype">void</font> lowerCase(XMLCh* <font class="keyword">const</font> toLowerCase);
74401467
74501471     <font class="keyword">static</font> <font class="keywordtype">bool</font> isWSReplaced(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> toCheck);
74601472
74701476     <font class="keyword">static</font> <font class="keywordtype">bool</font> isWSCollapsed(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> toCheck);
74801477
74901483     <font class="keyword">static</font> <font class="keywordtype">void</font> replaceWS(XMLCh* <font class="keyword">const</font> toConvert
75001484         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>);
75101485
75201491     <font class="keyword">static</font> <font class="keywordtype">void</font> collapseWS(XMLCh* <font class="keyword">const</font> toConvert
75301492         , <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font>  manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>);
75401493
75501499     <font class="keyword">static</font> <font class="keywordtype">void</font> removeWS(XMLCh* <font class="keyword">const</font> toConvert
75601500     , <a class="code" href="classMemoryManager.html">MemoryManager</a>*       <font class="keyword">const</font> manager = <a class="code" href="classXMLPlatformUtils.html#z488_4">XMLPlatformUtils::fgMemoryManager</a>);
75701501
75801502
75901508     <font class="keyword">static</font> <font class="keywordtype">void</font> removeChar(<font class="keyword">const</font> XMLCh*     <font class="keyword">const</font> srcString
76001509                          , <font class="keyword">const</font> XMLCh&amp;           toRemove
76101510                          ,       XMLBuffer&amp;       dstBuffer);
76201511
76301519     <font class="keyword">static</font> <font class="keywordtype">void</font> fixURI(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> str, XMLCh* <font class="keyword">const</font> target);
76401520
76501522
76601530     <font class="keyword">static</font> <font class="keywordtype">void</font> release(<font class="keywordtype">char</font>** buf);
76701531
76801538     <font class="keyword">static</font> <font class="keywordtype">void</font> release(XMLCh** buf);
76901539
77001546     <font class="keyword">static</font> <font class="keywordtype">void</font> release(<a class="code" href="XercesDefs_8hpp.html#a16">XMLByte</a>** buf);
77101547
77201549
77301550
77401551 <font class="keyword">private</font> :
77501552
77601556     <a class="code" href="classXMLString.html">XMLString</a>();
77701558     ~<a class="code" href="classXMLString.html">XMLString</a>();
77801560
77901561
78001565     <font class="keyword">static</font> <font class="keywordtype">void</font> initString(<a class="code" href="classXMLLCPTranscoder.html">XMLLCPTranscoder</a>* <font class="keyword">const</font> defToUse,
78101566                            <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager);
78201567     <font class="keyword">static</font> <font class="keywordtype">void</font> termString();
78301569
78401574     <font class="keyword">static</font> <font class="keywordtype">bool</font> validateRegion(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> str1, <font class="keyword">const</font> <font class="keywordtype">int</font> offset1,
78501575                         <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> str2, <font class="keyword">const</font> <font class="keywordtype">int</font> offset2,
78601576                         <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> charCount);
78701577
78801578     <font class="keyword">static</font> <a class="code" href="classMemoryManager.html">MemoryManager</a>* fgMemoryManager;
78901579
790<a name="l01580"></a><a class="code" href="classXMLString.html#l0">01580</a>     <font class="keyword">friend</font> <font class="keyword">class </font><a class="code" href="classXMLPlatformUtils.html">XMLPlatformUtils</a>;
79101581 };
79201582
79301583
79401584 <font class="comment">// ---------------------------------------------------------------------------</font>
79501585 <font class="comment">//  Inline some methods that are either just passthroughs to other string</font>
79601586 <font class="comment">//  methods, or which are key for performance.</font>
79701587 <font class="comment">// ---------------------------------------------------------------------------</font>
798<a name="l01588"></a><a class="code" href="classXMLString.html#z516_0">01588</a> <font class="keyword">inline</font> <font class="keywordtype">void</font> <a class="code" href="classXMLString.html#z516_0">XMLString::moveChars</a>(       XMLCh* <font class="keyword">const</font> targetStr
79901589                                 , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> srcStr
80001590                                 , <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> count)
80101591 {
80201592     memcpy(targetStr, srcStr, count * <font class="keyword">sizeof</font>(XMLCh));
80301593 }
80401594
805<a name="l01595"></a><a class="code" href="classXMLString.html#z519_9">01595</a> <font class="keyword">inline</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> <a class="code" href="classXMLString.html#z519_8">XMLString::stringLen</a>(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> src)
80601596 {
80701597     <font class="keywordflow">if</font> (src == 0 || *src == 0)
80801598     {
80901599         <font class="keywordflow">return</font> 0;
81001600    }
81101601     <font class="keywordflow">else</font>
81201602    {
81301603         <font class="keyword">const</font> XMLCh* pszTmp = src + 1;
81401604
81501605         <font class="keywordflow">while</font> (*pszTmp)
81601606             ++pszTmp;
81701607
81801608         <font class="keywordflow">return</font> (<font class="keywordtype">unsigned</font> <font class="keywordtype">int</font>)(pszTmp - src);
81901609     }
82001610 }
82101611
822<a name="l01612"></a><a class="code" href="classXMLString.html#z518_3">01612</a> <font class="keyword">inline</font> XMLCh* <a class="code" href="classXMLString.html#z518_0">XMLString::replicate</a>(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> toRep,
82301613                                    <a class="code" href="classMemoryManager.html">MemoryManager</a>* <font class="keyword">const</font> manager)
82401614 {
82501615     <font class="comment">// If a null string, return a null string!</font>
82601616     XMLCh* ret = 0;
82701617     <font class="keywordflow">if</font> (toRep)
82801618     {
82901619         <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> len = <a class="code" href="classXMLString.html#z519_8">stringLen</a>(toRep);
83001620         ret = (XMLCh*) manager-&gt;<a class="code" href="classMemoryManager.html#z221_0">allocate</a>((len+1) * <font class="keyword">sizeof</font>(XMLCh)); <font class="comment">//new XMLCh[len + 1];</font>
83101621         memcpy(ret, toRep, (len + 1) * <font class="keyword">sizeof</font>(XMLCh));
83201622     }
83301623     <font class="keywordflow">return</font> ret;
83401624 }
83501625
836<a name="l01626"></a><a class="code" href="classXMLString.html#z519_1">01626</a> <font class="keyword">inline</font> <font class="keywordtype">bool</font> <a class="code" href="classXMLString.html#z519_0">XMLString::startsWith</a>(  <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    toTest
83701627                                     , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    prefix)
83801628 {
83901629     <font class="keywordflow">return</font> (<a class="code" href="classXMLString.html#z512_2">compareNString</a>(toTest, prefix, <a class="code" href="classXMLString.html#z519_8">stringLen</a>(prefix)) == 0);
84001630 }
84101631
842<a name="l01632"></a><a class="code" href="classXMLString.html#z519_3">01632</a> <font class="keyword">inline</font> <font class="keywordtype">bool</font> <a class="code" href="classXMLString.html#z519_2">XMLString::startsWithI</a>( <font class="keyword">const</font>   XMLCh* <font class="keyword">const</font>    toTest
84301633                                     , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    prefix)
84401634 {
84501635     <font class="keywordflow">return</font> (<a class="code" href="classXMLString.html#z512_4">compareNIString</a>(toTest, prefix, <a class="code" href="classXMLString.html#z519_8">stringLen</a>(prefix)) == 0);
84601636 }
84701637
848<a name="l01638"></a><a class="code" href="classXMLString.html#z519_4">01638</a> <font class="keyword">inline</font> <font class="keywordtype">bool</font> <a class="code" href="classXMLString.html#z519_4">XMLString::endsWith</a>(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> toTest,
84901639                                 <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> suffix)
85001640 {
85101641
85201642     <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> suffixLen = <a class="code" href="classXMLString.html#z519_8">XMLString::stringLen</a>(suffix);
85301643
85401644     <font class="keywordflow">return</font> <a class="code" href="classXMLString.html#z512_10">regionMatches</a>(toTest, <a class="code" href="classXMLString.html#z519_8">XMLString::stringLen</a>(toTest) - suffixLen,
85501645                          suffix, 0, suffixLen);
85601646 }
85701647
85801648 <font class="keyword">inline</font> <font class="keywordtype">bool</font> XMLString::validateRegion(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> str1,
85901649                                       <font class="keyword">const</font> <font class="keywordtype">int</font> offset1,
86001650                                       <font class="keyword">const</font> XMLCh* <font class="keyword">const</font> str2,
86101651                                       <font class="keyword">const</font> <font class="keywordtype">int</font> offset2,
86201652                                       <font class="keyword">const</font> <font class="keywordtype">unsigned</font> <font class="keywordtype">int</font> charCount)
86301653 {
86401654
86501655     <font class="keywordflow">if</font> (offset1 &lt; 0 || offset2 &lt; 0 ||
86601656         (offset1 + charCount) &gt; <a class="code" href="classXMLString.html#z519_8">XMLString::stringLen</a>(str1) ||
86701657         (offset2 + charCount) &gt; <a class="code" href="classXMLString.html#z519_8">XMLString::stringLen</a>(str2) )
86801658         <font class="keywordflow">return</font> <font class="keyword">false</font>;
86901659
87001660     <font class="keywordflow">return</font> <font class="keyword">true</font>;
87101661 }
87201662
873<a name="l01663"></a><a class="code" href="classXMLString.html#z512_8">01663</a> <font class="keyword">inline</font> <font class="keywordtype">bool</font> <a class="code" href="classXMLString.html#z512_8">XMLString::equals</a>(   <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    str1
87401664                                , <font class="keyword">const</font> XMLCh* <font class="keyword">const</font>    str2)
87501665 {
87601666     <font class="keyword">const</font> XMLCh* psz1 = str1;
87701667     <font class="keyword">const</font> XMLCh* psz2 = str2;
87801668
87901669     <font class="keywordflow">if</font> (psz1 == 0 || psz2 == 0) {
88001670         <font class="keywordflow">if</font> ((psz1 != 0 &amp;&amp; *psz1) || (psz2 != 0 &amp;&amp; *psz2))
88101671             <font class="keywordflow">return</font> <font class="keyword">false</font>;
88201672         <font class="keywordflow">else</font>
88301673             <font class="keywordflow">return</font> <font class="keyword">true</font>;
88401674     }
88501675
88601676     <font class="keywordflow">while</font> (*psz1 == *psz2)
88701677     {
88801678         <font class="comment">// If either has ended, then they both ended, so equal</font>
88901679         <font class="keywordflow">if</font> (!*psz1)
89001680             <font class="keywordflow">return</font> <font class="keyword">true</font>;
89101681
89201682         <font class="comment">// Move upwards for the next round</font>
89301683         psz1++;
89401684         psz2++;
89501685     }
89601686     <font class="keywordflow">return</font> <font class="keyword">false</font>;
89701687 }
89801688
899<a name="l01689"></a><a class="code" href="classXMLString.html#z512_9">01689</a> <font class="keyword">inline</font> <font class="keywordtype">bool</font> <a class="code" href="classXMLString.html#z512_8">XMLString::equals</a>(   <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>    str1
90001690                                , <font class="keyword">const</font> <font class="keywordtype">char</font>* <font class="keyword">const</font>    str2)
90101691 {
90201692     <font class="keyword">const</font> <font class="keywordtype">char</font>* psz1 = str1;
90301693     <font class="keyword">const</font> <font class="keywordtype">char</font>* psz2 = str2;
90401694
90501695     <font class="keywordflow">if</font> (psz1 == 0 || psz2 == 0) {
90601696         <font class="keywordflow">if</font> ((psz1 != 0 &amp;&amp; *psz1) || (psz2 != 0 &amp;&amp; *psz2))
90701697             <font class="keywordflow">return</font> <font class="keyword">false</font>;
90801698         <font class="keywordflow">else</font>
90901699             <font class="keywordflow">return</font> <font class="keyword">true</font>;
91001700     }
91101701
91201702     <font class="keywordflow">while</font> (*psz1 == *psz2)
91301703     {
91401704         <font class="comment">// If either has ended, then they both ended, so equal</font>
91501705         <font class="keywordflow">if</font> (!*psz1)
91601706             <font class="keywordflow">return</font> <font class="keyword">true</font>;
91701707
91801708         <font class="comment">// Move upwards for the next round</font>
91901709         psz1++;
92001710         psz2++;
92101711     }
92201712     <font class="keywordflow">return</font> <font class="keyword">false</font>;
92301713 }
92401714
925<a name="l01715"></a><a class="code" href="classXMLString.html#z515_5">01715</a> <font class="keyword">inline</font> <font class="keywordtype">int</font> <a class="code" href="classXMLString.html#z515_4">XMLString::lastIndexOf</a>(<font class="keyword">const</font> XMLCh* <font class="keyword">const</font> toSearch, <font class="keyword">const</font> XMLCh ch)
92601716 {
92701717     <font class="keywordflow">return</font> <a class="code" href="classXMLString.html#z515_4">XMLString::lastIndexOf</a>(ch, toSearch, <a class="code" href="classXMLString.html#z519_8">stringLen</a>(toSearch));
92801718 }
92901719
93001720 <a class="code" href="XercesDefs_8hpp.html#a3">XERCES_CPP_NAMESPACE_END</a>
93101721
93201722 <font class="preprocessor">#endif</font>
933</pre></div>    </FONT></TD></TR></TABLE><BR>
934</TD></TR></TABLE></TD></TR></TABLE><BR><TABLE border="0" cellpadding="0" cellspacing="0" width="620"><TR><TD bgcolor="#0086b2"><IMG height="1" src="images/dot.gif" width="1" alt=""></TD></TR><TR><TD align="center"><FONT color="#0086b2" size="-1"><I>
935              Copyright &copy; 1994-2004 The Apache Software Foundation.
936              All Rights Reserved.
937            </I></FONT></TD></TR></TABLE></BODY></HTML>
Note: See TracBrowser for help on using the repository browser.