1<?xml version="1.0" encoding="UTF-8"?> 2<html> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> 5 <title>chvalid: Unicode character range checking</title> 6 <meta name="generator" content="Libxml2 devhelp stylesheet"/> 7 <link rel="start" href="index.html" title="libxml2 Reference Manual"/> 8 <link rel="up" href="general.html" title="API"/> 9 <link rel="stylesheet" href="style.css" type="text/css"/> 10 <link rel="chapter" href="general.html" title="API"/> 11 </head> 12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 13 <table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> 14 <tr valign="middle"> 15 <td> 16 <a accesskey="p" href="libxml2-catalog.html"> 17 <img src="left.png" width="24" height="24" border="0" alt="Prev"/> 18 </a> 19 </td> 20 <td> 21 <a accesskey="u" href="general.html"> 22 <img src="up.png" width="24" height="24" border="0" alt="Up"/> 23 </a> 24 </td> 25 <td> 26 <a accesskey="h" href="index.html"> 27 <img src="home.png" width="24" height="24" border="0" alt="Home"/> 28 </a> 29 </td> 30 <td> 31 <a accesskey="n" href="libxml2-debugXML.html"> 32 <img src="right.png" width="24" height="24" border="0" alt="Next"/> 33 </a> 34 </td> 35 <th width="100%" align="center">libxml2 Reference Manual</th> 36 </tr> 37 </table> 38 <h2> 39 <span class="refentrytitle">chvalid</span> 40 </h2> 41 <p>chvalid - Unicode character range checking</p> 42 <p>this module exports interfaces for the character range validation APIs This file is automatically generated from the cvs source definition files using the genChRanges.py Python script </p> 43 <p>Author(s): William Brack <wbrack@mmm.com.hk> </p> 44 <div class="refsynopsisdiv"> 45 <h2>Synopsis</h2> 46 <pre class="synopsis">#define <a href="#xmlIsExtender_ch">xmlIsExtender_ch</a>(c); 47#define <a href="#xmlIsPubidCharQ">xmlIsPubidCharQ</a>(c); 48#define <a href="#xmlIsPubidChar_ch">xmlIsPubidChar_ch</a>(c); 49#define <a href="#xmlIsIdeographicQ">xmlIsIdeographicQ</a>(c); 50#define <a href="#xmlIsExtenderQ">xmlIsExtenderQ</a>(c); 51#define <a href="#xmlIsChar_ch">xmlIsChar_ch</a>(c); 52#define <a href="#xmlIsDigitQ">xmlIsDigitQ</a>(c); 53#define <a href="#xmlIsDigit_ch">xmlIsDigit_ch</a>(c); 54#define <a href="#xmlIsBaseChar_ch">xmlIsBaseChar_ch</a>(c); 55#define <a href="#xmlIsCombiningQ">xmlIsCombiningQ</a>(c); 56#define <a href="#xmlIsBlankQ">xmlIsBlankQ</a>(c); 57#define <a href="#xmlIsCharQ">xmlIsCharQ</a>(c); 58#define <a href="#xmlIsBaseCharQ">xmlIsBaseCharQ</a>(c); 59#define <a href="#xmlIsBlank_ch">xmlIsBlank_ch</a>(c); 60typedef struct _xmlChLRange <a href="#xmlChLRange">xmlChLRange</a>; 61typedef <a href="libxml2-chvalid.html#xmlChSRange">xmlChSRange</a> * <a href="#xmlChSRangePtr">xmlChSRangePtr</a>; 62typedef <a href="libxml2-chvalid.html#xmlChLRange">xmlChLRange</a> * <a href="#xmlChLRangePtr">xmlChLRangePtr</a>; 63typedef <a href="libxml2-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> * <a href="#xmlChRangeGroupPtr">xmlChRangeGroupPtr</a>; 64typedef struct _xmlChSRange <a href="#xmlChSRange">xmlChSRange</a>; 65typedef struct _xmlChRangeGroup <a href="#xmlChRangeGroup">xmlChRangeGroup</a>; 66int <a href="#xmlIsChar">xmlIsChar</a> (unsigned int ch); 67int <a href="#xmlIsDigit">xmlIsDigit</a> (unsigned int ch); 68int <a href="#xmlIsBlank">xmlIsBlank</a> (unsigned int ch); 69int <a href="#xmlIsIdeographic">xmlIsIdeographic</a> (unsigned int ch); 70int <a href="#xmlCharInRange">xmlCharInRange</a> (unsigned int val, <br/> const <a href="libxml2-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> * rptr); 71int <a href="#xmlIsPubidChar">xmlIsPubidChar</a> (unsigned int ch); 72int <a href="#xmlIsCombining">xmlIsCombining</a> (unsigned int ch); 73int <a href="#xmlIsBaseChar">xmlIsBaseChar</a> (unsigned int ch); 74int <a href="#xmlIsExtender">xmlIsExtender</a> (unsigned int ch); 75</pre> 76 </div> 77 <div class="refsect1" lang="en"> 78 <h2>Description</h2> 79 </div> 80 <div class="refsect1" lang="en"> 81 <h2>Details</h2> 82 <div class="refsect2" lang="en"> 83 <div class="refsect2" lang="en"><h3><a name="xmlIsBaseCharQ">Macro </a>xmlIsBaseCharQ</h3><pre class="programlisting">#define <a href="#xmlIsBaseCharQ">xmlIsBaseCharQ</a>(c); 84</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div> 85</div> 86 <hr/> 87 <div class="refsect2" lang="en"><h3><a name="xmlIsBaseChar_ch">Macro </a>xmlIsBaseChar_ch</h3><pre class="programlisting">#define <a href="#xmlIsBaseChar_ch">xmlIsBaseChar_ch</a>(c); 88</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div> 89</div> 90 <hr/> 91 <div class="refsect2" lang="en"><h3><a name="xmlIsBlankQ">Macro </a>xmlIsBlankQ</h3><pre class="programlisting">#define <a href="#xmlIsBlankQ">xmlIsBlankQ</a>(c); 92</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div> 93</div> 94 <hr/> 95 <div class="refsect2" lang="en"><h3><a name="xmlIsBlank_ch">Macro </a>xmlIsBlank_ch</h3><pre class="programlisting">#define <a href="#xmlIsBlank_ch">xmlIsBlank_ch</a>(c); 96</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div> 97</div> 98 <hr/> 99 <div class="refsect2" lang="en"><h3><a name="xmlIsCharQ">Macro </a>xmlIsCharQ</h3><pre class="programlisting">#define <a href="#xmlIsCharQ">xmlIsCharQ</a>(c); 100</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div> 101</div> 102 <hr/> 103 <div class="refsect2" lang="en"><h3><a name="xmlIsChar_ch">Macro </a>xmlIsChar_ch</h3><pre class="programlisting">#define <a href="#xmlIsChar_ch">xmlIsChar_ch</a>(c); 104</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div> 105</div> 106 <hr/> 107 <div class="refsect2" lang="en"><h3><a name="xmlIsCombiningQ">Macro </a>xmlIsCombiningQ</h3><pre class="programlisting">#define <a href="#xmlIsCombiningQ">xmlIsCombiningQ</a>(c); 108</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div> 109</div> 110 <hr/> 111 <div class="refsect2" lang="en"><h3><a name="xmlIsDigitQ">Macro </a>xmlIsDigitQ</h3><pre class="programlisting">#define <a href="#xmlIsDigitQ">xmlIsDigitQ</a>(c); 112</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div> 113</div> 114 <hr/> 115 <div class="refsect2" lang="en"><h3><a name="xmlIsDigit_ch">Macro </a>xmlIsDigit_ch</h3><pre class="programlisting">#define <a href="#xmlIsDigit_ch">xmlIsDigit_ch</a>(c); 116</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div> 117</div> 118 <hr/> 119 <div class="refsect2" lang="en"><h3><a name="xmlIsExtenderQ">Macro </a>xmlIsExtenderQ</h3><pre class="programlisting">#define <a href="#xmlIsExtenderQ">xmlIsExtenderQ</a>(c); 120</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div> 121</div> 122 <hr/> 123 <div class="refsect2" lang="en"><h3><a name="xmlIsExtender_ch">Macro </a>xmlIsExtender_ch</h3><pre class="programlisting">#define <a href="#xmlIsExtender_ch">xmlIsExtender_ch</a>(c); 124</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div> 125</div> 126 <hr/> 127 <div class="refsect2" lang="en"><h3><a name="xmlIsIdeographicQ">Macro </a>xmlIsIdeographicQ</h3><pre class="programlisting">#define <a href="#xmlIsIdeographicQ">xmlIsIdeographicQ</a>(c); 128</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div> 129</div> 130 <hr/> 131 <div class="refsect2" lang="en"><h3><a name="xmlIsPubidCharQ">Macro </a>xmlIsPubidCharQ</h3><pre class="programlisting">#define <a href="#xmlIsPubidCharQ">xmlIsPubidCharQ</a>(c); 132</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div> 133</div> 134 <hr/> 135 <div class="refsect2" lang="en"><h3><a name="xmlIsPubidChar_ch">Macro </a>xmlIsPubidChar_ch</h3><pre class="programlisting">#define <a href="#xmlIsPubidChar_ch">xmlIsPubidChar_ch</a>(c); 136</pre><p>Automatically generated by genChRanges.py</p><div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>c</tt></i>:</span></td><td>char to validate</td></tr></tbody></table></div> 137</div> 138 <hr/> 139 <div class="refsect2" lang="en"><h3><a name="xmlChLRange">Structure </a>xmlChLRange</h3><pre class="programlisting">struct _xmlChLRange { 140 unsigned int low 141 unsigned int high 142} xmlChLRange; 143</pre><p/> 144</div> 145 <hr/> 146 <div class="refsect2" lang="en"><h3><a name="xmlChLRangePtr">Typedef </a>xmlChLRangePtr</h3><pre class="programlisting"><a href="libxml2-chvalid.html#xmlChLRange">xmlChLRange</a> * xmlChLRangePtr; 147</pre><p/> 148</div> 149 <hr/> 150 <div class="refsect2" lang="en"><h3><a name="xmlChRangeGroup">Structure </a>xmlChRangeGroup</h3><pre class="programlisting">struct _xmlChRangeGroup { 151 int nbShortRange 152 int nbLongRange 153 const <a href="libxml2-chvalid.html#xmlChSRange">xmlChSRange</a> * shortRange : points to an array of ranges 154 const <a href="libxml2-chvalid.html#xmlChLRange">xmlChLRange</a> * longRange 155} xmlChRangeGroup; 156</pre><p/> 157</div> 158 <hr/> 159 <div class="refsect2" lang="en"><h3><a name="xmlChRangeGroupPtr">Typedef </a>xmlChRangeGroupPtr</h3><pre class="programlisting"><a href="libxml2-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> * xmlChRangeGroupPtr; 160</pre><p/> 161</div> 162 <hr/> 163 <div class="refsect2" lang="en"><h3><a name="xmlChSRange">Structure </a>xmlChSRange</h3><pre class="programlisting">struct _xmlChSRange { 164 unsigned short low 165 unsigned short high 166} xmlChSRange; 167</pre><p/> 168</div> 169 <hr/> 170 <div class="refsect2" lang="en"><h3><a name="xmlChSRangePtr">Typedef </a>xmlChSRangePtr</h3><pre class="programlisting"><a href="libxml2-chvalid.html#xmlChSRange">xmlChSRange</a> * xmlChSRangePtr; 171</pre><p/> 172</div> 173 <hr/> 174 <div class="refsect2" lang="en"><h3><a name="xmlIsBaseCharGroup">Variable </a>xmlIsBaseCharGroup</h3><pre class="programlisting">const <a href="libxml2-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> xmlIsBaseCharGroup; 175</pre><p/> 176</div> 177 <hr/> 178 <div class="refsect2" lang="en"><h3><a name="xmlIsCharGroup">Variable </a>xmlIsCharGroup</h3><pre class="programlisting">const <a href="libxml2-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> xmlIsCharGroup; 179</pre><p/> 180</div> 181 <hr/> 182 <div class="refsect2" lang="en"><h3><a name="xmlIsCombiningGroup">Variable </a>xmlIsCombiningGroup</h3><pre class="programlisting">const <a href="libxml2-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> xmlIsCombiningGroup; 183</pre><p/> 184</div> 185 <hr/> 186 <div class="refsect2" lang="en"><h3><a name="xmlIsDigitGroup">Variable </a>xmlIsDigitGroup</h3><pre class="programlisting">const <a href="libxml2-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> xmlIsDigitGroup; 187</pre><p/> 188</div> 189 <hr/> 190 <div class="refsect2" lang="en"><h3><a name="xmlIsExtenderGroup">Variable </a>xmlIsExtenderGroup</h3><pre class="programlisting">const <a href="libxml2-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> xmlIsExtenderGroup; 191</pre><p/> 192</div> 193 <hr/> 194 <div class="refsect2" lang="en"><h3><a name="xmlIsIdeographicGroup">Variable </a>xmlIsIdeographicGroup</h3><pre class="programlisting">const <a href="libxml2-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> xmlIsIdeographicGroup; 195</pre><p/> 196</div> 197 <hr/> 198 <div class="refsect2" lang="en"><h3><a name="xmlIsPubidChar_tab">Variable </a>xmlIsPubidChar_tab</h3><pre class="programlisting">const unsigned charxmlIsPubidChar_tab[256] xmlIsPubidChar_tab; 199</pre><p/> 200</div> 201 <hr/> 202 <div class="refsect2" lang="en"><h3><a name="xmlCharInRange"/>xmlCharInRange ()</h3><pre class="programlisting">int xmlCharInRange (unsigned int val, <br/> const <a href="libxml2-chvalid.html#xmlChRangeGroup">xmlChRangeGroup</a> * rptr)<br/> 203</pre><p>Does a binary search of the range table to determine if char is valid</p> 204<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>val</tt></i>:</span></td><td>character to be validated</td></tr><tr><td><span class="term"><i><tt>rptr</tt></i>:</span></td><td>pointer to range to be used to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if character valid, false otherwise</td></tr></tbody></table></div></div> 205 <hr/> 206 <div class="refsect2" lang="en"><h3><a name="xmlIsBaseChar"/>xmlIsBaseChar ()</h3><pre class="programlisting">int xmlIsBaseChar (unsigned int ch)<br/> 207</pre><p>This function is DEPRECATED. Use <a href="libxml2-chvalid.html#xmlIsBaseChar_ch">xmlIsBaseChar_ch</a> or <a href="libxml2-chvalid.html#xmlIsBaseCharQ">xmlIsBaseCharQ</a> instead</p> 208<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div></div> 209 <hr/> 210 <div class="refsect2" lang="en"><h3><a name="xmlIsBlank"/>xmlIsBlank ()</h3><pre class="programlisting">int xmlIsBlank (unsigned int ch)<br/> 211</pre><p>This function is DEPRECATED. Use <a href="libxml2-chvalid.html#xmlIsBlank_ch">xmlIsBlank_ch</a> or <a href="libxml2-chvalid.html#xmlIsBlankQ">xmlIsBlankQ</a> instead</p> 212<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div></div> 213 <hr/> 214 <div class="refsect2" lang="en"><h3><a name="xmlIsChar"/>xmlIsChar ()</h3><pre class="programlisting">int xmlIsChar (unsigned int ch)<br/> 215</pre><p>This function is DEPRECATED. Use <a href="libxml2-chvalid.html#xmlIsChar_ch">xmlIsChar_ch</a> or <a href="libxml2-chvalid.html#xmlIsCharQ">xmlIsCharQ</a> instead</p> 216<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div></div> 217 <hr/> 218 <div class="refsect2" lang="en"><h3><a name="xmlIsCombining"/>xmlIsCombining ()</h3><pre class="programlisting">int xmlIsCombining (unsigned int ch)<br/> 219</pre><p>This function is DEPRECATED. Use <a href="libxml2-chvalid.html#xmlIsCombiningQ">xmlIsCombiningQ</a> instead</p> 220<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div></div> 221 <hr/> 222 <div class="refsect2" lang="en"><h3><a name="xmlIsDigit"/>xmlIsDigit ()</h3><pre class="programlisting">int xmlIsDigit (unsigned int ch)<br/> 223</pre><p>This function is DEPRECATED. Use <a href="libxml2-chvalid.html#xmlIsDigit_ch">xmlIsDigit_ch</a> or <a href="libxml2-chvalid.html#xmlIsDigitQ">xmlIsDigitQ</a> instead</p> 224<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div></div> 225 <hr/> 226 <div class="refsect2" lang="en"><h3><a name="xmlIsExtender"/>xmlIsExtender ()</h3><pre class="programlisting">int xmlIsExtender (unsigned int ch)<br/> 227</pre><p>This function is DEPRECATED. Use <a href="libxml2-chvalid.html#xmlIsExtender_ch">xmlIsExtender_ch</a> or <a href="libxml2-chvalid.html#xmlIsExtenderQ">xmlIsExtenderQ</a> instead</p> 228<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div></div> 229 <hr/> 230 <div class="refsect2" lang="en"><h3><a name="xmlIsIdeographic"/>xmlIsIdeographic ()</h3><pre class="programlisting">int xmlIsIdeographic (unsigned int ch)<br/> 231</pre><p>This function is DEPRECATED. Use <a href="libxml2-chvalid.html#xmlIsIdeographicQ">xmlIsIdeographicQ</a> instead</p> 232<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div></div> 233 <hr/> 234 <div class="refsect2" lang="en"><h3><a name="xmlIsPubidChar"/>xmlIsPubidChar ()</h3><pre class="programlisting">int xmlIsPubidChar (unsigned int ch)<br/> 235</pre><p>This function is DEPRECATED. Use <a href="libxml2-chvalid.html#xmlIsPubidChar_ch">xmlIsPubidChar_ch</a> or <a href="libxml2-chvalid.html#xmlIsPubidCharQ">xmlIsPubidCharQ</a> instead</p> 236<div class="variablelist"><table border="0"><col align="left"/><tbody><tr><td><span class="term"><i><tt>ch</tt></i>:</span></td><td>character to validate</td></tr><tr><td><span class="term"><i><tt>Returns</tt></i>:</span></td><td>true if argument valid, false otherwise</td></tr></tbody></table></div></div> 237 <hr/> 238 </div> 239 </div> 240 </body> 241</html> 242