File: group__string.html

package info (click to toggle)
klone 1.1.1.dfsg1-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 6,480 kB
  • ctags: 4,238
  • sloc: ansic: 16,288; makefile: 384; sh: 351
file content (1022 lines) | stat: -rw-r--r-- 43,348 bytes parent folder | download
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
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>LibU: String</title>
<link href="kl.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.9.1 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a></div>
<h1>String</h1><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga2">u_buf_reserve</a> (u_buf_t *ubuf, size_t size)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Enlarge the underlaying memory block of the given buffer.  <a href="#ga2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga3">u_buf_append</a> (u_buf_t *ubuf, void *data, size_t size)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Append some data to the buffer.  <a href="#ga3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga4">u_buf_load</a> (u_buf_t *ubuf, char *filename)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Fill a buffer object with the content of a file.  <a href="#ga4"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga5">u_buf_detach</a> (u_buf_t *ubuf)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Release buffer's underlaying memory block without freeing it.  <a href="#ga5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga6">u_buf_size</a> (u_buf_t *ubuf)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the size of memory block allocated by the buffer.  <a href="#ga6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga7">u_buf_len</a> (u_buf_t *ubuf)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the length of the buffer.  <a href="#ga7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga8">u_buf_clear</a> (u_buf_t *ubuf)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clear a buffer.  <a href="#ga8"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga9">u_buf_set</a> (u_buf_t *ubuf, void *data, size_t size)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the value of a buffer.  <a href="#ga9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga10">u_buf_ptr</a> (u_buf_t *ubuf)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a pointer to the buffer internal momory block.  <a href="#ga10"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga11">u_buf_free</a> (u_buf_t *ubuf)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Free a buffer.  <a href="#ga11"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga12">u_buf_create</a> (u_buf_t **pubuf)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a new buffer.  <a href="#ga12"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga13">u_string_trim</a> (u_string_t *s)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Remove leading and trailing blanks.  <a href="#ga13"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga14">u_string_set_length</a> (u_string_t *s, size_t len)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the length of a string (shortening it).  <a href="#ga14"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga15">u_string_len</a> (u_string_t *s)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the string length.  <a href="#ga15"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga16">u_string_c</a> (u_string_t *s)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the string value.  <a href="#ga16"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga17">u_string_copy</a> (u_string_t *dst, u_string_t *src)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy the value of a string to another.  <a href="#ga17"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga18">u_string_clear</a> (u_string_t *s)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Clear a string.  <a href="#ga18"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga19">u_string_create</a> (const char *buf, size_t len, u_string_t **ps)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a new string.  <a href="#ga19"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga20">u_string_free</a> (u_string_t *s)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Free a string.  <a href="#ga20"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga21">u_string_set</a> (u_string_t *s, const char *buf, size_t len)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the value of a string.  <a href="#ga21"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__string.html#ga22">u_string_append</a> (u_string_t *s, const char *buf, size_t len)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Append a char* to a string.  <a href="#ga22"></a><br></td></tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="ga3" doxytag="buf.c::u_buf_append"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int u_buf_append           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u_buf_t *&nbsp;</td>
          <td class="mdname" nowrap> <em>ubuf</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>size_t&nbsp;</td>
          <td class="mdname" nowrap> <em>size</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Append <em>data</em> of size <em>size</em> to the given buffer. If needed the buffer will be enlarged.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ubuf</em>&nbsp;</td><td>buffer object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>the data block to append </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>size of <em>data</em> </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>0</code> on success, not zero on failure </dd></dl>

<p>
Definition at line <a class="el" href="buf_8c-source.html#l00072">72</a> of file <a class="el" href="buf_8c-source.html">buf.c</a>.
<p>
References <a class="el" href="buf_8c-source.html#l00035">u_buf_reserve()</a>.
<p>
Referenced by <a class="el" href="buf_8c-source.html#l00233">u_buf_set()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga8" doxytag="buf.c::u_buf_clear"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int u_buf_clear           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u_buf_t *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>ubuf</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Totally erase the content of the given buffer. The memory allocated by the buffer will not be released until <a class="el" href="group__string.html#ga11">u_buf_free()</a> is called.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ubuf</em>&nbsp;</td><td>buffer object</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>0</code> on success, not zero on failure </dd></dl>

<p>
Definition at line <a class="el" href="buf_8c-source.html#l00210">210</a> of file <a class="el" href="buf_8c-source.html">buf.c</a>.
<p>
Referenced by <a class="el" href="buf_8c-source.html#l00104">u_buf_load()</a>, and <a class="el" href="buf_8c-source.html#l00233">u_buf_set()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga12" doxytag="buf.c::u_buf_create"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int u_buf_create           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u_buf_t **&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pubuf</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create a new buffer object and save its pointer to <em>*ps</em>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>pubuf</em>&nbsp;</td><td>on success will get the new buffer object</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>0</code> on success, not zero on failure </dd></dl>

<p>
Definition at line <a class="el" href="buf_8c-source.html#l00296">296</a> of file <a class="el" href="buf_8c-source.html">buf.c</a>.
<p>
References <a class="el" href="memory_8c-source.html#l00030">u_zalloc()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga5" doxytag="buf.c::u_buf_detach"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int u_buf_detach           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u_buf_t *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>ubuf</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Release the underlaying memory block of the given buffer without calling free() on it. The caller must free the buffer later on (probably after using it somwhow).<p>
Use <a class="el" href="group__string.html#ga10">u_buf_ptr()</a> to get the pointer of the memory block, <a class="el" href="group__string.html#ga6">u_buf_size()</a> to get its size and <a class="el" href="group__string.html#ga7">u_buf_len()</a> to get its length.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ubuf</em>&nbsp;</td><td>buffer object</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>0</code> on success, not zero on failure </dd></dl>

<p>
Definition at line <a class="el" href="buf_8c-source.html#l00151">151</a> of file <a class="el" href="buf_8c-source.html">buf.c</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga11" doxytag="buf.c::u_buf_free"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int u_buf_free           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u_buf_t *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>ubuf</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Release all resources and free the given buffer object.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ubuf</em>&nbsp;</td><td>buffer object</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>0</code> on success, not zero on failure </dd></dl>

<p>
Definition at line <a class="el" href="buf_8c-source.html#l00275">275</a> of file <a class="el" href="buf_8c-source.html">buf.c</a>.
<p>
References <a class="el" href="memory_8c-source.html#l00042">u_free()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga7" doxytag="buf.c::u_buf_len"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">size_t u_buf_len           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u_buf_t *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>ubuf</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the length of data store in the given buffer.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ubuf</em>&nbsp;</td><td>buffer object</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the data buffer length </dd></dl>

<p>
Definition at line <a class="el" href="buf_8c-source.html#l00191">191</a> of file <a class="el" href="buf_8c-source.html">buf.c</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga4" doxytag="buf.c::u_buf_load"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int u_buf_load           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u_buf_t *&nbsp;</td>
          <td class="mdname" nowrap> <em>ubuf</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>char *&nbsp;</td>
          <td class="mdname" nowrap> <em>filename</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Open <em>filename</em> and copy its whole content into the given buffer.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ubuf</em>&nbsp;</td><td>buffer object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>filename</em>&nbsp;</td><td>the source filename</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>0</code> on success, not zero on failure </dd></dl>

<p>
Definition at line <a class="el" href="buf_8c-source.html#l00104">104</a> of file <a class="el" href="buf_8c-source.html">buf.c</a>.
<p>
References <a class="el" href="buf_8c-source.html#l00210">u_buf_clear()</a>, and <a class="el" href="buf_8c-source.html#l00035">u_buf_reserve()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga10" doxytag="buf.c::u_buf_ptr"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void* u_buf_ptr           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u_buf_t *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>ubuf</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return a void* pointer to the memory block allocated by the buffer object.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ubuf</em>&nbsp;</td><td>buffer object</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>0</code> on success, not zero on failure </dd></dl>

<p>
Definition at line <a class="el" href="buf_8c-source.html#l00257">257</a> of file <a class="el" href="buf_8c-source.html">buf.c</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga2" doxytag="buf.c::u_buf_reserve"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int u_buf_reserve           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u_buf_t *&nbsp;</td>
          <td class="mdname" nowrap> <em>ubuf</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>size_t&nbsp;</td>
          <td class="mdname" nowrap> <em>size</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Enlarge the buffer data block to (at least) <em>size</em> bytes.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ubuf</em>&nbsp;</td><td>buffer object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>requested size</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>0</code> on success, not zero on failure </dd></dl>

<p>
Definition at line <a class="el" href="buf_8c-source.html#l00035">35</a> of file <a class="el" href="buf_8c-source.html">buf.c</a>.
<p>
References <a class="el" href="memory_8c-source.html#l00036">u_realloc()</a>.
<p>
Referenced by <a class="el" href="buf_8c-source.html#l00072">u_buf_append()</a>, and <a class="el" href="buf_8c-source.html#l00104">u_buf_load()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga9" doxytag="buf.c::u_buf_set"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int u_buf_set           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u_buf_t *&nbsp;</td>
          <td class="mdname" nowrap> <em>ubuf</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>void *&nbsp;</td>
          <td class="mdname" nowrap> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>size_t&nbsp;</td>
          <td class="mdname" nowrap> <em>size</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the value of <em>ubuf</em> to <em>data</em>. If needed the buffer object will alloc more memory to store the <em>data</em> value.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ubuf</em>&nbsp;</td><td>buffer object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>the value that will be copied into the buffer </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>size</em>&nbsp;</td><td>size of <em>data</em> </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>0</code> on success, not zero on failure </dd></dl>

<p>
Definition at line <a class="el" href="buf_8c-source.html#l00233">233</a> of file <a class="el" href="buf_8c-source.html">buf.c</a>.
<p>
References <a class="el" href="buf_8c-source.html#l00072">u_buf_append()</a>, and <a class="el" href="buf_8c-source.html#l00210">u_buf_clear()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga6" doxytag="buf.c::u_buf_size"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">size_t u_buf_size           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u_buf_t *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>ubuf</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the size of memory block allocated by the buffer.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ubuf</em>&nbsp;</td><td>buffer object</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the data buffer length </dd></dl>

<p>
Definition at line <a class="el" href="buf_8c-source.html#l00173">173</a> of file <a class="el" href="buf_8c-source.html">buf.c</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga22" doxytag="str.c::u_string_append"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int u_string_append           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u_string_t *&nbsp;</td>
          <td class="mdname" nowrap> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>size_t&nbsp;</td>
          <td class="mdname" nowrap> <em>len</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Append a char* value to the given string.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>string object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td>the value that will be appended to <em>s</em> </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>length of <em>buf</em> </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>0</code> on success, not zero on failure </dd></dl>

<p>
Definition at line <a class="el" href="str_8c-source.html#l00227">227</a> of file <a class="el" href="str_8c-source.html">str.c</a>.
<p>
References <a class="el" href="memory_8c-source.html#l00036">u_realloc()</a>.
<p>
Referenced by <a class="el" href="str_8c-source.html#l00116">u_string_copy()</a>, <a class="el" href="str_8c-source.html#l00157">u_string_create()</a>, and <a class="el" href="str_8c-source.html#l00210">u_string_set()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga16" doxytag="str.c::u_string_c"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">const char* u_string_c           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u_string_t *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>s</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the const char* value of the given string object. Such const char* value cannot be modified, realloc'd or free'd.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>string object</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the string value or NULL if the string is empty </dd></dl>

<p>
Definition at line <a class="el" href="str_8c-source.html#l00101">101</a> of file <a class="el" href="str_8c-source.html">str.c</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga18" doxytag="str.c::u_string_clear"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int u_string_clear           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u_string_t *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>s</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Totally erase the content of the given string.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>string object</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>0</code> on success, not zero on failure </dd></dl>

<p>
Definition at line <a class="el" href="str_8c-source.html#l00131">131</a> of file <a class="el" href="str_8c-source.html">str.c</a>.
<p>
Referenced by <a class="el" href="str_8c-source.html#l00116">u_string_copy()</a>, and <a class="el" href="str_8c-source.html#l00210">u_string_set()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga17" doxytag="str.c::u_string_copy"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int u_string_copy           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u_string_t *&nbsp;</td>
          <td class="mdname" nowrap> <em>dst</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>u_string_t *&nbsp;</td>
          <td class="mdname" nowrap> <em>src</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"><code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Copy <em>src</em> string to <em>dst</em> string.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>dst</em>&nbsp;</td><td>destination string </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>src</em>&nbsp;</td><td>source string</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>0</code> on success, not zero on failure </dd></dl>

<p>
Definition at line <a class="el" href="str_8c-source.html#l00116">116</a> of file <a class="el" href="str_8c-source.html">str.c</a>.
<p>
References <a class="el" href="str_8c-source.html#l00227">u_string_append()</a>, and <a class="el" href="str_8c-source.html#l00131">u_string_clear()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga19" doxytag="str.c::u_string_create"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int u_string_create           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>size_t&nbsp;</td>
          <td class="mdname" nowrap> <em>len</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>u_string_t **&nbsp;</td>
          <td class="mdname" nowrap> <em>ps</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Create a new string object and save its pointer to <em>*ps</em>.<p>
If <em>buf</em> is not NULL (and <em>len</em> &gt; 0) the string will be initialized with the content of <em>buf</em>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td>initial string value </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>length of <em>buf</em> </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>ps</em>&nbsp;</td><td>on success will get the new string object</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>0</code> on success, not zero on failure </dd></dl>

<p>
Definition at line <a class="el" href="str_8c-source.html#l00157">157</a> of file <a class="el" href="str_8c-source.html">str.c</a>.
<p>
References <a class="el" href="str_8c-source.html#l00227">u_string_append()</a>, and <a class="el" href="memory_8c-source.html#l00030">u_zalloc()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga20" doxytag="str.c::u_string_free"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int u_string_free           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u_string_t *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>s</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Release all resources and free the given string object.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>string object</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>0</code> on success, not zero on failure </dd></dl>

<p>
Definition at line <a class="el" href="str_8c-source.html#l00187">187</a> of file <a class="el" href="str_8c-source.html">str.c</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga15" doxytag="str.c::u_string_len"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">size_t u_string_len           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u_string_t *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>s</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap><code> [inline]</code></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Return the length of the given string.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>string object</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>the string length </dd></dl>

<p>
Definition at line <a class="el" href="str_8c-source.html#l00086">86</a> of file <a class="el" href="str_8c-source.html">str.c</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga21" doxytag="str.c::u_string_set"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int u_string_set           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u_string_t *&nbsp;</td>
          <td class="mdname" nowrap> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>const char *&nbsp;</td>
          <td class="mdname" nowrap> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>size_t&nbsp;</td>
          <td class="mdname" nowrap> <em>len</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Set the value of <em>s</em> to <em>buf</em>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>string object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td>the value that will be copied to <em>s</em> </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>length of <em>buf</em> </td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>0</code> on success, not zero on failure </dd></dl>

<p>
Definition at line <a class="el" href="str_8c-source.html#l00210">210</a> of file <a class="el" href="str_8c-source.html">str.c</a>.
<p>
References <a class="el" href="str_8c-source.html#l00227">u_string_append()</a>, and <a class="el" href="str_8c-source.html#l00131">u_string_clear()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga14" doxytag="str.c::u_string_set_length"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int u_string_set_length           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u_string_t *&nbsp;</td>
          <td class="mdname" nowrap> <em>s</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>size_t&nbsp;</td>
          <td class="mdname" nowrap> <em>len</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>string object </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>len</em>&nbsp;</td><td>on success <em>s</em> will be <em>len</em> chars long</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>0</code> on success, not zero on failure </dd></dl>

<p>
Definition at line <a class="el" href="str_8c-source.html#l00062">62</a> of file <a class="el" href="str_8c-source.html">str.c</a>.    </td>
  </tr>
</table>
<a class="anchor" name="ga13" doxytag="str.c::u_string_trim"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">int u_string_trim           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">u_string_t *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>s</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Remove leading and trailing blanks from the given string<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>s</em>&nbsp;</td><td>string object</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd><code>0</code> on success, not zero on failure </dd></dl>

<p>
Definition at line <a class="el" href="str_8c-source.html#l00041">41</a> of file <a class="el" href="str_8c-source.html">str.c</a>.
<p>
References <a class="el" href="misc_8c-source.html#l00040">u_trim()</a>.    </td>
  </tr>
</table>
<hr>
<div> 
  <div style="text-align:left">
    <a href="http://www.koanlogic.com/kl/cont/gb/html/products.html">&larr;Products</a>
  </div>
  <div style="text-align:center;">
    &copy; 2005-2006 - <a href="http://www.koanlogic.com">KoanLogic S.r.l.</a> - All rights reserved
  </div>
</div>

</body>
</html>