File size: 34,731 Bytes
53a37cf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>xmlstring: set of routines to process strings</title>
<meta name="generator" content="Libxml2 devhelp stylesheet">
<link rel="start" href="index.html" title="libxml2 Reference Manual">
<link rel="up" href="general.html" title="API">
<link rel="stylesheet" href="style.css" type="text/css">
<link rel="chapter" href="general.html" title="API">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle">
<td><a accesskey="p" href="libxml2-xmlschemastypes.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="general.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<td><a accesskey="n" href="libxml2-xmlunicode.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
<th width="100%" align="center">libxml2 Reference Manual</th>
</tr></table>
<h2><span class="refentrytitle">xmlstring</span></h2>
<p>xmlstring - set of routines to process strings</p>
<p>type and interfaces needed for the internal string handling of the library, especially UTF8 processing. </p>
<p>Author(s): Daniel Veillard </p>
<div class="refsynopsisdiv">
<h2>Synopsis</h2>
<pre class="synopsis">#define <a href="#BAD_CAST">BAD_CAST</a>;
typedef unsigned char <a href="#xmlChar">xmlChar</a>;
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlCharStrdup">xmlCharStrdup</a>		(const char * cur);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlCharStrndup">xmlCharStrndup</a>		(const char * cur, <br>					 int len);
int	<a href="#xmlCheckUTF8">xmlCheckUTF8</a>			(const unsigned char * utf);
int	<a href="#xmlGetUTF8Char">xmlGetUTF8Char</a>			(const unsigned char * utf, <br>					 int * len);
int	<a href="#xmlStrEqual">xmlStrEqual</a>			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2);
int	<a href="#xmlStrPrintf">xmlStrPrintf</a>			(<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buf, <br>					 int len, <br>					 const char * msg, <br>					 ... ...);
int	<a href="#xmlStrQEqual">xmlStrQEqual</a>			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pref, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str);
int	<a href="#xmlStrVPrintf">xmlStrVPrintf</a>			(<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buf, <br>					 int len, <br>					 const char * msg, <br>					 va_list ap);
int	<a href="#xmlStrcasecmp">xmlStrcasecmp</a>			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2);
const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlStrcasestr">xmlStrcasestr</a>		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlStrcat">xmlStrcat</a>		(<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * add);
const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlStrchr">xmlStrchr</a>		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br>					 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> val);
int	<a href="#xmlStrcmp">xmlStrcmp</a>			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlStrdup">xmlStrdup</a>		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur);
int	<a href="#xmlStrlen">xmlStrlen</a>			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str);
int	<a href="#xmlStrncasecmp">xmlStrncasecmp</a>			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2, <br>					 int len);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlStrncat">xmlStrncat</a>		(<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * add, <br>					 int len);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlStrncatNew">xmlStrncatNew</a>		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2, <br>					 int len);
int	<a href="#xmlStrncmp">xmlStrncmp</a>			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2, <br>					 int len);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlStrndup">xmlStrndup</a>		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br>					 int len);
const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlStrstr">xmlStrstr</a>		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlStrsub">xmlStrsub</a>		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br>					 int start, <br>					 int len);
int	<a href="#xmlUTF8Charcmp">xmlUTF8Charcmp</a>			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf1, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf2);
int	<a href="#xmlUTF8Size">xmlUTF8Size</a>			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf);
int	<a href="#xmlUTF8Strlen">xmlUTF8Strlen</a>			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf);
int	<a href="#xmlUTF8Strloc">xmlUTF8Strloc</a>			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utfchar);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlUTF8Strndup">xmlUTF8Strndup</a>		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br>					 int len);
const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlUTF8Strpos">xmlUTF8Strpos</a>		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br>					 int pos);
int	<a href="#xmlUTF8Strsize">xmlUTF8Strsize</a>			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br>					 int len);
<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	<a href="#xmlUTF8Strsub">xmlUTF8Strsub</a>		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br>					 int start, <br>					 int len);
</pre>
</div>
<div class="refsect1" lang="en"><h2>Description</h2></div>
<div class="refsect1" lang="en">
<h2>Details</h2>
<div class="refsect2" lang="en">
<div class="refsect2" lang="en">
<h3>
<a name="BAD_CAST">Macro </a>BAD_CAST</h3>
<pre class="programlisting">#define <a href="#BAD_CAST">BAD_CAST</a>;
</pre>
<p>Macro to cast a string to an <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * when one know its safe.</p>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlChar">Typedef </a>xmlChar</h3>
<pre class="programlisting">unsigned char xmlChar;
</pre>
<p>This is a basic byte in an UTF-8 encoded string. It's unsigned allowing to pinpoint case where char * are assigned to <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * (possibly making serialization back impossible).</p>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlCharStrdup"></a>xmlCharStrdup ()</h3>
<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	xmlCharStrdup		(const char * cur)<br>
</pre>
<p>a strdup for char's to xmlChar's</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>cur</tt></i>:</span></td>
<td>the input char *</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>a new <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlCharStrndup"></a>xmlCharStrndup ()</h3>
<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	xmlCharStrndup		(const char * cur, <br>					 int len)<br>
</pre>
<p>a strndup for char's to xmlChar's</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>cur</tt></i>:</span></td>
<td>the input char *</td>
</tr>
<tr>
<td><span class="term"><i><tt>len</tt></i>:</span></td>
<td>the len of @cur</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>a new <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlCheckUTF8"></a>xmlCheckUTF8 ()</h3>
<pre class="programlisting">int	xmlCheckUTF8			(const unsigned char * utf)<br>
</pre>
<p>Checks @utf for being valid UTF-8. @utf is assumed to be null-terminated. This function is not super-strict, as it will allow longer UTF-8 sequences than necessary. Note that Java is capable of producing these sequences if provoked. Also note, this routine checks for the 4-byte maximum size, but does not check for 0x10ffff maximum value.</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>utf</tt></i>:</span></td>
<td>Pointer to putative UTF-8 encoded string.</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>value: true if @utf is valid.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlGetUTF8Char"></a>xmlGetUTF8Char ()</h3>
<pre class="programlisting">int	xmlGetUTF8Char			(const unsigned char * utf, <br>					 int * len)<br>
</pre>
<p>Read the first UTF8 character from @utf</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>utf</tt></i>:</span></td>
<td>a sequence of UTF-8 encoded bytes</td>
</tr>
<tr>
<td><span class="term"><i><tt>len</tt></i>:</span></td>
<td>a pointer to the minimum number of bytes present in the sequence. This is used to assure the next character is completely contained within the sequence.</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the char value or -1 in case of error, and sets *len to the actual number of bytes consumed (0 in case of error)</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlStrEqual"></a>xmlStrEqual ()</h3>
<pre class="programlisting">int	xmlStrEqual			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2)<br>
</pre>
<p>Check if both strings are equal of have same content. Should be a bit more readable and faster than xmlStrcmp()</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>str1</tt></i>:</span></td>
<td>the first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td>
</tr>
<tr>
<td><span class="term"><i><tt>str2</tt></i>:</span></td>
<td>the second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>1 if they are equal, 0 if they are different</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlStrPrintf"></a>xmlStrPrintf ()</h3>
<pre class="programlisting">int	xmlStrPrintf			(<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buf, <br>					 int len, <br>					 const char * msg, <br>					 ... ...)<br>
</pre>
<p>Formats @msg and places result into @buf.</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>buf</tt></i>:</span></td>
<td>the result buffer.</td>
</tr>
<tr>
<td><span class="term"><i><tt>len</tt></i>:</span></td>
<td>the result buffer length.</td>
</tr>
<tr>
<td><span class="term"><i><tt>msg</tt></i>:</span></td>
<td>the message with printf formatting.</td>
</tr>
<tr>
<td><span class="term"><i><tt>...</tt></i>:</span></td>
<td>extra parameters for the message.</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the number of <a href="libxml2-SAX.html#characters">characters</a> written to @buf or -1 if an error occurs.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlStrQEqual"></a>xmlStrQEqual ()</h3>
<pre class="programlisting">int	xmlStrQEqual			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * pref, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str)<br>
</pre>
<p>Check if a QName is Equal to a given string</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>pref</tt></i>:</span></td>
<td>the prefix of the QName</td>
</tr>
<tr>
<td><span class="term"><i><tt>name</tt></i>:</span></td>
<td>the localname of the QName</td>
</tr>
<tr>
<td><span class="term"><i><tt>str</tt></i>:</span></td>
<td>the second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>1 if they are equal, 0 if they are different</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlStrVPrintf"></a>xmlStrVPrintf ()</h3>
<pre class="programlisting">int	xmlStrVPrintf			(<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * buf, <br>					 int len, <br>					 const char * msg, <br>					 va_list ap)<br>
</pre>
<p>Formats @msg and places result into @buf.</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>buf</tt></i>:</span></td>
<td>the result buffer.</td>
</tr>
<tr>
<td><span class="term"><i><tt>len</tt></i>:</span></td>
<td>the result buffer length.</td>
</tr>
<tr>
<td><span class="term"><i><tt>msg</tt></i>:</span></td>
<td>the message with printf formatting.</td>
</tr>
<tr>
<td><span class="term"><i><tt>ap</tt></i>:</span></td>
<td>extra parameters for the message.</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the number of <a href="libxml2-SAX.html#characters">characters</a> written to @buf or -1 if an error occurs.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlStrcasecmp"></a>xmlStrcasecmp ()</h3>
<pre class="programlisting">int	xmlStrcasecmp			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2)<br>
</pre>
<p>a strcasecmp for xmlChar's</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>str1</tt></i>:</span></td>
<td>the first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td>
</tr>
<tr>
<td><span class="term"><i><tt>str2</tt></i>:</span></td>
<td>the second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the integer result of the comparison</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlStrcasestr"></a>xmlStrcasestr ()</h3>
<pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	xmlStrcasestr		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val)<br>
</pre>
<p>a case-ignoring strstr for xmlChar's</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>str</tt></i>:</span></td>
<td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array (haystack)</td>
</tr>
<tr>
<td><span class="term"><i><tt>val</tt></i>:</span></td>
<td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> to search (needle)</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * for the first occurrence or NULL.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlStrcat"></a>xmlStrcat ()</h3>
<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	xmlStrcat		(<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * add)<br>
</pre>
<p>a strcat for array of xmlChar's. Since they are supposed to be encoded in UTF-8 or an encoding with 8bit based chars, we assume a termination mark of '0'.</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>cur</tt></i>:</span></td>
<td>the original <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array</td>
</tr>
<tr>
<td><span class="term"><i><tt>add</tt></i>:</span></td>
<td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array added</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>a new <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * containing the concatenated string. The original @cur is reallocated and should not be freed.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlStrchr"></a>xmlStrchr ()</h3>
<pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	xmlStrchr		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br>					 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> val)<br>
</pre>
<p>a strchr for xmlChar's</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>str</tt></i>:</span></td>
<td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array</td>
</tr>
<tr>
<td><span class="term"><i><tt>val</tt></i>:</span></td>
<td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> to search</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * for the first occurrence or NULL.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlStrcmp"></a>xmlStrcmp ()</h3>
<pre class="programlisting">int	xmlStrcmp			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2)<br>
</pre>
<p>a strcmp for xmlChar's</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>str1</tt></i>:</span></td>
<td>the first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td>
</tr>
<tr>
<td><span class="term"><i><tt>str2</tt></i>:</span></td>
<td>the second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the integer result of the comparison</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlStrdup"></a>xmlStrdup ()</h3>
<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	xmlStrdup		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur)<br>
</pre>
<p>a strdup for array of xmlChar's. Since they are supposed to be encoded in UTF-8 or an encoding with 8bit based chars, we assume a termination mark of '0'.</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>cur</tt></i>:</span></td>
<td>the input <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>a new <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlStrlen"></a>xmlStrlen ()</h3>
<pre class="programlisting">int	xmlStrlen			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str)<br>
</pre>
<p>length of a xmlChar's string</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>str</tt></i>:</span></td>
<td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> contained in the ARRAY.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlStrncasecmp"></a>xmlStrncasecmp ()</h3>
<pre class="programlisting">int	xmlStrncasecmp			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2, <br>					 int len)<br>
</pre>
<p>a strncasecmp for xmlChar's</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>str1</tt></i>:</span></td>
<td>the first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td>
</tr>
<tr>
<td><span class="term"><i><tt>str2</tt></i>:</span></td>
<td>the second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td>
</tr>
<tr>
<td><span class="term"><i><tt>len</tt></i>:</span></td>
<td>the max comparison length</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the integer result of the comparison</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlStrncat"></a>xmlStrncat ()</h3>
<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	xmlStrncat		(<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * add, <br>					 int len)<br>
</pre>
<p>a strncat for array of xmlChar's, it will extend @cur with the len first bytes of @add. Note that if @len &lt; 0 then this is an API error and NULL will be returned.</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>cur</tt></i>:</span></td>
<td>the original <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array</td>
</tr>
<tr>
<td><span class="term"><i><tt>add</tt></i>:</span></td>
<td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array added</td>
</tr>
<tr>
<td><span class="term"><i><tt>len</tt></i>:</span></td>
<td>the length of @add</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>a new <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *, the original @cur is reallocated and should not be freed.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlStrncatNew"></a>xmlStrncatNew ()</h3>
<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	xmlStrncatNew		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2, <br>					 int len)<br>
</pre>
<p>same as xmlStrncat, but creates a new string. The original two strings are not freed. If @len is &lt; 0 then the length will be calculated automatically.</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>str1</tt></i>:</span></td>
<td>first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td>
</tr>
<tr>
<td><span class="term"><i><tt>str2</tt></i>:</span></td>
<td>second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> string</td>
</tr>
<tr>
<td><span class="term"><i><tt>len</tt></i>:</span></td>
<td>the len of @str2 or &lt; 0</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>a new <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlStrncmp"></a>xmlStrncmp ()</h3>
<pre class="programlisting">int	xmlStrncmp			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str1, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str2, <br>					 int len)<br>
</pre>
<p>a strncmp for xmlChar's</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>str1</tt></i>:</span></td>
<td>the first <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td>
</tr>
<tr>
<td><span class="term"><i><tt>str2</tt></i>:</span></td>
<td>the second <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td>
</tr>
<tr>
<td><span class="term"><i><tt>len</tt></i>:</span></td>
<td>the max comparison length</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the integer result of the comparison</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlStrndup"></a>xmlStrndup ()</h3>
<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	xmlStrndup		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur, <br>					 int len)<br>
</pre>
<p>a strndup for array of xmlChar's</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>cur</tt></i>:</span></td>
<td>the input <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *</td>
</tr>
<tr>
<td><span class="term"><i><tt>len</tt></i>:</span></td>
<td>the len of @cur</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>a new <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * or NULL</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlStrstr"></a>xmlStrstr ()</h3>
<pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	xmlStrstr		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * val)<br>
</pre>
<p>a strstr for xmlChar's</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>str</tt></i>:</span></td>
<td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array (haystack)</td>
</tr>
<tr>
<td><span class="term"><i><tt>val</tt></i>:</span></td>
<td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> to search (needle)</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * for the first occurrence or NULL.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlStrsub"></a>xmlStrsub ()</h3>
<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	xmlStrsub		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br>					 int start, <br>					 int len)<br>
</pre>
<p>Extract a substring of a given string</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>str</tt></i>:</span></td>
<td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * array (haystack)</td>
</tr>
<tr>
<td><span class="term"><i><tt>start</tt></i>:</span></td>
<td>the index of the first char (zero based)</td>
</tr>
<tr>
<td><span class="term"><i><tt>len</tt></i>:</span></td>
<td>the length of the substring</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * for the first occurrence or NULL.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlUTF8Charcmp"></a>xmlUTF8Charcmp ()</h3>
<pre class="programlisting">int	xmlUTF8Charcmp			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf1, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf2)<br>
</pre>
<p>compares the two UCS4 values</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>utf1</tt></i>:</span></td>
<td>pointer to first UTF8 char</td>
</tr>
<tr>
<td><span class="term"><i><tt>utf2</tt></i>:</span></td>
<td>pointer to second UTF8 char</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>result of the compare as with <a href="libxml2-xmlstring.html#xmlStrncmp">xmlStrncmp</a>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlUTF8Size"></a>xmlUTF8Size ()</h3>
<pre class="programlisting">int	xmlUTF8Size			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf)<br>
</pre>
<p>calculates the internal size of a UTF8 character</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>utf</tt></i>:</span></td>
<td>pointer to the UTF8 character</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the numbers of bytes in the character, -1 on format error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlUTF8Strlen"></a>xmlUTF8Strlen ()</h3>
<pre class="programlisting">int	xmlUTF8Strlen			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf)<br>
</pre>
<p>compute the length of an UTF8 string, it doesn't do a full UTF8 checking of the content of the string.</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>utf</tt></i>:</span></td>
<td>a sequence of UTF-8 encoded bytes</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the number of <a href="libxml2-SAX.html#characters">characters</a> in the string or -1 in case of error</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlUTF8Strloc"></a>xmlUTF8Strloc ()</h3>
<pre class="programlisting">int	xmlUTF8Strloc			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br>					 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utfchar)<br>
</pre>
<p>a function to provide the relative location of a UTF8 char</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>utf</tt></i>:</span></td>
<td>the input UTF8 *</td>
</tr>
<tr>
<td><span class="term"><i><tt>utfchar</tt></i>:</span></td>
<td>the UTF8 character to be found</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the relative character position of the desired char or -1 if not found</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlUTF8Strndup"></a>xmlUTF8Strndup ()</h3>
<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	xmlUTF8Strndup		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br>					 int len)<br>
</pre>
<p>a strndup for array of UTF8's</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>utf</tt></i>:</span></td>
<td>the input UTF8 *</td>
</tr>
<tr>
<td><span class="term"><i><tt>len</tt></i>:</span></td>
<td>the len of @utf (in chars)</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>a new UTF8 * or NULL</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlUTF8Strpos"></a>xmlUTF8Strpos ()</h3>
<pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	xmlUTF8Strpos		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br>					 int pos)<br>
</pre>
<p>a function to provide the equivalent of fetching a character from a string array</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>utf</tt></i>:</span></td>
<td>the input UTF8 *</td>
</tr>
<tr>
<td><span class="term"><i><tt>pos</tt></i>:</span></td>
<td>the position of the desired UTF8 char (in chars)</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>a pointer to the UTF8 character or NULL</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlUTF8Strsize"></a>xmlUTF8Strsize ()</h3>
<pre class="programlisting">int	xmlUTF8Strsize			(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br>					 int len)<br>
</pre>
<p>storage size of an UTF8 string the behaviour is not guaranteed if the input string is not UTF-8</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>utf</tt></i>:</span></td>
<td>a sequence of UTF-8 encoded bytes</td>
</tr>
<tr>
<td><span class="term"><i><tt>len</tt></i>:</span></td>
<td>the number of <a href="libxml2-SAX.html#characters">characters</a> in the array</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>the storage size of the first 'len' <a href="libxml2-SAX.html#characters">characters</a> of ARRAY</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" lang="en">
<h3>
<a name="xmlUTF8Strsub"></a>xmlUTF8Strsub ()</h3>
<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *	xmlUTF8Strsub		(const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * utf, <br>					 int start, <br>					 int len)<br>
</pre>
<p>Create a substring from a given UTF-8 string Note: positions are given in units of UTF-8 chars</p>
<div class="variablelist"><table border="0">
<col align="left">
<tbody>
<tr>
<td><span class="term"><i><tt>utf</tt></i>:</span></td>
<td>a sequence of UTF-8 encoded bytes</td>
</tr>
<tr>
<td><span class="term"><i><tt>start</tt></i>:</span></td>
<td>relative pos of first char</td>
</tr>
<tr>
<td><span class="term"><i><tt>len</tt></i>:</span></td>
<td>total number to copy</td>
</tr>
<tr>
<td><span class="term"><i><tt>Returns</tt></i>:</span></td>
<td>a pointer to a newly created string or NULL if the start index is out of bounds or a memory allocation failed. If len is too large, the result is truncated.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
</div>
</div>
</body>
</html>