summaryrefslogtreecommitdiff
path: root/docs/reference/glib/tmpl/string_utils.sgml
blob: 7451399a4083cc422c20ba55b4fb14218211acc7 (plain)
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
<!-- ##### SECTION Title ##### -->
String Utility Functions

<!-- ##### SECTION Short_Description ##### -->
various string-related functions.

<!-- ##### SECTION Long_Description ##### -->
<para>
This section describes a number of utility functions for creating,
duplicating, and manipulating strings.
</para>
<para>
Note that the functions g_printf(), g_fprintf(), g_sprintf(), g_snprintf(),
g_vprintf(), g_vfprintf(), g_vsprintf() and g_vsnprintf() are declared in 
the header <filename>gprintf.h</filename> which is <emphasis>not</emphasis>
included in <filename>glib.h</filename> (otherwise using 
<filename>glib.h</filename> would drag in <filename>stdio.h</filename>), so
you'll have to explicitly include <literal>&lt;glib/gprintf.h&gt;</literal> 
in order to use the GLib printf() functions. 
</para>
<para id="string-precision">
While you may use the printf() functions to format UTF-8 strings, notice that
the precision of a <literal>&percnt;Ns</literal> parameter is interpreted as the
number of <emphasis>bytes</emphasis>, not <emphasis>characters</emphasis> to print.
On top of that, the GNU libc implementation of the printf() functions has the "feature"
that it checks that the string given for the <literal>&percnt;Ns</literal> parameter
consists of a whole number of characters in the current encoding. So, unless you
are sure you are always going to be in an UTF-8 locale or your know your text is restricted 
to ASCII, avoid using <literal>&percnt;Ns</literal>.
If your intention is to format strings for a certain number of columns, then 
<literal>&percnt;Ns</literal> is not a correct solution anyway, since it fails to take 
wide characters (see g_unichar_iswide()) into account.
</para>

<!-- ##### SECTION See_Also ##### -->
<para>

</para>

<!-- ##### SECTION Stability_Level ##### -->


<!-- ##### FUNCTION g_strdup ##### -->
<para>
Duplicates a string.
If @str is %NULL it returns %NULL.
The returned string should be freed when no longer needed.
</para>

@str: the string to duplicate.
@Returns: a newly-allocated copy of @str.


<!-- ##### FUNCTION g_strndup ##### -->
<para>
Duplicates the first @n characters of a string, returning a newly-allocated
buffer @n + 1 characters long which will always be nul-terminated.
If @str is less than @n characters long the buffer is padded with nuls.
If @str is %NULL it returns %NULL.
The returned value should be freed when no longer needed.
</para>

@str: the string to duplicate part of.
@n: the maximum number of characters to copy from @str.
@Returns: a newly-allocated buffer containing the first @n characters of @str,
nul-terminated.


<!-- ##### FUNCTION g_strdupv ##### -->
<para>
</para>

@str_array: 
@Returns: 


<!-- ##### FUNCTION g_strnfill ##### -->
<para>
Creates a new string @length characters long filled with @fill_char.
The returned string should be freed when no longer needed.
</para>

@length: the length of the new string.
@fill_char: the character to fill the string with.
@Returns: a newly-allocated string filled the @fill_char.


<!-- ##### FUNCTION g_stpcpy ##### -->
<para>

</para>

@dest: 
@src: 
@Returns: 


<!-- ##### FUNCTION g_strstr_len ##### -->
<para>

</para>

@haystack: 
@haystack_len: 
@needle: 
@Returns: 


<!-- ##### FUNCTION g_strrstr ##### -->
<para>

</para>

@haystack: 
@needle: 
@Returns: 


<!-- ##### FUNCTION g_strrstr_len ##### -->
<para>

</para>

@haystack: 
@haystack_len: 
@needle: 
@Returns: 


<!-- ##### FUNCTION g_str_has_prefix ##### -->
<para>

</para>

@str: 
@prefix: 
@Returns: 


<!-- ##### FUNCTION g_str_has_suffix ##### -->
<para>

</para>

@str: 
@suffix: 
@Returns: 


<!-- ##### FUNCTION g_strlcpy ##### -->
<para>
Portability wrapper that calls strlcpy() on systems which have it, and emulates
strlcpy() otherwise. Copies @src to @dest; @dest is guaranteed to be
nul-terminated; @src must be nul-terminated; @dest_size is the buffer size, not
the number of chars to copy. Caveat: strlcpy() is supposedly more secure than
strcpy() or strncpy(), but if you really want to avoid screwups, g_strdup() is
an even better idea.
</para>

@dest: destination buffer
@src: source buffer
@dest_size: length of @dest in bytes
@Returns: length of @src


<!-- ##### FUNCTION g_strlcat ##### -->
<para>
Portability wrapper that calls strlcat() on systems which have it, and emulates it otherwise. 
Appends nul-terminated @src string to @dest, guaranteeing
nul-termination for @dest. The total size of @dest won't exceed
@dest_size. Caveat: this is supposedly a more secure alternative to strcat() or
strncat(), but for real security g_strconcat() is harder to mess up.
</para>

@dest: destination buffer, already containing one nul-terminated string
@src: source buffer
@dest_size: length of @dest buffer in bytes (not length of existing string inside @dest)
@Returns: length of @src plus initial length of string in @dest


<!-- ##### FUNCTION g_strdup_printf ##### -->
<para>
Similar to the standard C sprintf() function
but safer, since it calculates the maximum space required and allocates
memory to hold the result.
The returned string should be freed when no longer needed.
</para>

@format: a standard printf() format string, but notice 
  <link linkend="string-precision">string precision pitfalls</link>.
@Varargs: the parameters to insert into the format string.
@Returns: a newly-allocated string holding the result.


<!-- ##### FUNCTION g_strdup_vprintf ##### -->
<para>
Similar to the standard C vsprintf() function
but safer, since it calculates the maximum space required and allocates
memory to hold the result.
The returned string should be freed when no longer needed.
</para>
<para>
See also g_vasprintf(), which offers the same functionality, but additionally
returns the length of the allocated string. 
</para>

@format: a standard printf() format string, but notice 
  <link linkend="string-precision">string precision pitfalls</link>.
@args: the list of parameters to insert into the format string.
@Returns: a newly-allocated string holding the result.


<!-- ##### FUNCTION g_printf ##### -->
<para>

</para>

@format: 
@Varargs: 
@Returns: 


<!-- ##### FUNCTION g_vprintf ##### -->
<para>

</para>

@format: 
@args: 
@Returns: 


<!-- ##### FUNCTION g_fprintf ##### -->
<para>

</para>

@file: 
@format: 
@Varargs: 
@Returns: 


<!-- ##### FUNCTION g_vfprintf ##### -->
<para>

</para>

@file: 
@format: 
@args: 
@Returns: 


<!-- ##### FUNCTION g_sprintf ##### -->
<para>

</para>

@string: 
@format: 
@Varargs: 
@Returns: 


<!-- ##### FUNCTION g_vsprintf ##### -->
<para>

</para>

@string: 
@format: 
@args: 
@Returns: 


<!-- ##### FUNCTION g_snprintf ##### -->
<para>
</para>

@string: 
@n: 
@format: 
@Varargs: 
@Returns: 


<!-- ##### FUNCTION g_vsnprintf ##### -->
<para>
</para>

@string: 
@n: 
@format: 
@args: 
@Returns: 


<!-- ##### FUNCTION g_vasprintf ##### -->
<para>

</para>

@string: 
@format: 
@args: 
@Returns: 


<!-- ##### FUNCTION g_printf_string_upper_bound ##### -->
<para>
Calculates the maximum space needed to store the output of the sprintf() function.
</para>

@format: the format string. See the printf() documentation.
@args: the parameters to be inserted into the format string.
@Returns: the maximum space needed to store the formatted string.


<!-- ##### FUNCTION g_ascii_isalnum ##### -->
<para>
Determines whether a character is alphanumeric.
</para>
<para>
Unlike the standard C library isalnum() function, this only
recognizes standard ASCII letters and ignores the locale, returning
%FALSE for all non-ASCII characters. Also unlike the standard
library function, this takes a <type>char</type>, not an <type>int</type>, 
so don't call it on %EOF but no need to cast to #guchar before passing a 
possibly non-ASCII character in.
</para>

@c: any character
@Returns: %TRUE if @c is an ASCII alphanumeric character


<!-- ##### FUNCTION g_ascii_isalpha ##### -->
<para>
Determines whether a character is alphabetic (i.e. a letter).
</para>
<para>
Unlike the standard C library isalpha() function, this only
recognizes standard ASCII letters and ignores the locale, returning
%FALSE for all non-ASCII characters. Also unlike the standard
library function, this takes a <type>char</type>, not an <type>int</type>, 
so don't call it on %EOF but no need to cast to #guchar before passing a 
possibly non-ASCII character in.
</para>

@c: any character
@Returns: %TRUE if @c is an ASCII alphabetic character


<!-- ##### FUNCTION g_ascii_iscntrl ##### -->
<para>
Determines whether a character is a control character.
</para>
<para>
Unlike the standard C library iscntrl() function, this only
recognizes standard ASCII control characters and ignores the locale,
returning %FALSE for all non-ASCII characters. Also unlike the standard
library function, this takes a <type>char</type>, not an <type>int</type>, 
so don't call it on %EOF but no need to cast to #guchar before passing a 
possibly non-ASCII character in.
</para>

@c: any character
@Returns: %TRUE if @c is an ASCII control character.


<!-- ##### FUNCTION g_ascii_isdigit ##### -->
<para>
Determines whether a character is digit (0-9).
</para>
<para>
Unlike the standard C library isdigit() function,
this takes a <type>char</type>, not an <type>int</type>, so don't call it
on %EOF but no need to cast to #guchar before passing a possibly
non-ASCII character in.
</para>

@c: any character
@Returns: %TRUE if @c is an ASCII digit.


<!-- ##### FUNCTION g_ascii_isgraph ##### -->
<para>
Determines whether a character is a printing character and not a space.
</para>
<para>
Unlike the standard C library isgraph() function, 
this only recognizes standard ASCII characters and ignores the locale, 
returning %FALSE for all non-ASCII characters. Also unlike the standard
library function, this takes a <type>char</type>, not an <type>int</type>, 
so don't call it on %EOF but no need to cast to #guchar before passing a 
possibly non-ASCII character in.
</para>

@c: any character
@Returns: %TRUE if @c is an ASCII printing character other than space.


<!-- ##### FUNCTION g_ascii_islower ##### -->
<para>
Determines whether a character is an ASCII lower case letter.
</para>
<para>
Unlike the standard C library islower() function, 
this only recognizes standard ASCII letters and ignores the locale,
returning %FALSE for all non-ASCII characters. Also unlike the standard
library function, this takes a <type>char</type>, not an <type>int</type>, 
so don't call it on %EOF but no need to worry about casting to #guchar 
before passing a possibly non-ASCII character in.
</para>

@c: any character
@Returns: %TRUE if @c is an ASCII lower case letter


<!-- ##### FUNCTION g_ascii_isprint ##### -->
<para>
Determines whether a character is a printing character.
</para>
<para>
Unlike the standard C library isprint() function, 
this only recognizes standard ASCII characters and ignores the locale, 
returning %FALSE for all non-ASCII characters. Also unlike the standard
library function, this takes a <type>char</type>, not an <type>int</type>, 
so don't call it on %EOF but no need to cast to #guchar before passing a 
possibly non-ASCII character in.
</para>

@c: any character
@Returns: %TRUE if @c is an ASCII printing character.


<!-- ##### FUNCTION g_ascii_ispunct ##### -->
<para>
Determines whether a character is a punctuation character.
</para>
<para>
Unlike the standard C library ispunct() function, 
this only recognizes standard ASCII letters and ignores the locale, 
returning %FALSE for all non-ASCII characters. Also unlike the standard
library function, this takes a <type>char</type>, not an <type>int</type>, 
so don't call it on %EOF but no need to cast to #guchar before passing a 
possibly non-ASCII character in.
</para>

@c: any character
@Returns: %TRUE if @c is an ASCII punctuation character.


<!-- ##### FUNCTION g_ascii_isspace ##### -->
<para>
Determines whether a character is a white-space character.
</para>
<para>
Unlike the standard C library isspace() function, 
this only recognizes standard ASCII white-space and ignores the locale, 
returning %FALSE for all non-ASCII characters. Also unlike the standard
library function, this takes a <type>char</type>, not an <type>int</type>, 
so don't call it on %EOF but no need to cast to #guchar before passing a 
possibly non-ASCII character in.
</para>

@c: any character
@Returns: %TRUE if @c is an ASCII white-space character


<!-- ##### FUNCTION g_ascii_isupper ##### -->
<para>
Determines whether a character is an ASCII upper case letter.
</para>
<para>
Unlike the standard C library isupper() function, 
this only recognizes standard ASCII letters and ignores the locale, 
returning %FALSE for all non-ASCII characters. Also unlike the standard
library function, this takes a <type>char</type>, not an <type>int</type>, 
so don't call it on %EOF but no need to worry about casting to #guchar 
before passing a possibly non-ASCII character in.
</para>

@c: any character
@Returns: %TRUE if @c is an ASCII upper case letter


<!-- ##### FUNCTION g_ascii_isxdigit ##### -->
<para>
Determines whether a character is a hexadecimal-digit character.
</para>
<para>
Unlike the standard C library isxdigit() function,
this takes a <type>char</type>, not an <type>int</type>, so
don't call it on %EOF but no need to cast to #guchar before passing a
possibly non-ASCII character in.
</para>

@c: any character
@Returns: %TRUE if @c is an ASCII hexadecimal-digit character.


<!-- ##### FUNCTION g_ascii_digit_value ##### -->
<para>

</para>

@c: 
@Returns: 


<!-- ##### FUNCTION g_ascii_xdigit_value ##### -->
<para>

</para>

@c: 
@Returns: 


<!-- ##### FUNCTION g_ascii_strcasecmp ##### -->
<para>

</para>

@s1: 
@s2: 
@Returns: 


<!-- ##### FUNCTION g_ascii_strncasecmp ##### -->
<para>

</para>

@s1: 
@s2: 
@n: 
@Returns: 


<!-- ##### FUNCTION g_ascii_strup ##### -->
<para>

</para>

@str: 
@len: 
@Returns: 


<!-- ##### FUNCTION g_ascii_strdown ##### -->
<para>

</para>

@str: 
@len: 
@Returns: 


<!-- ##### FUNCTION g_ascii_tolower ##### -->
<para>

</para>

@c: 
@Returns: 


<!-- ##### FUNCTION g_ascii_toupper ##### -->
<para>

</para>

@c: 
@Returns: 


<!-- ##### FUNCTION g_string_ascii_up ##### -->
<para>

</para>

@string: 
@Returns: 


<!-- ##### FUNCTION g_string_ascii_down ##### -->
<para>

</para>

@string: 
@Returns: 


<!-- ##### FUNCTION g_strup ##### -->
<para>
</para>

@string: 
@Returns: 


<!-- ##### FUNCTION g_strdown ##### -->
<para>
</para>

@string: 
@Returns: 


<!-- ##### FUNCTION g_strcasecmp ##### -->
<para>
</para>

@s1: 
@s2: 
@Returns: 


<!-- ##### FUNCTION g_strncasecmp ##### -->
<para>
</para>

@s1: 
@s2: 
@n: 
@Returns: 


<!-- ##### FUNCTION g_strreverse ##### -->
<para>
Reverses all of the bytes in a string.
For example, <literal>g_strreverse ("abcdef")</literal> will result in "fedcba".
</para>
<para>
Note that g_strreverse() doesn't work on UTF-8 strings containing multibyte characters. 
For that purpose, use g_utf8_strreverse().
</para>

@string: the string to reverse.
@Returns: the same pointer passed in as @string.


<!-- ##### FUNCTION g_ascii_strtoull ##### -->
<para>

</para>

@nptr: 
@endptr: 
@base: 
@Returns: 


<!-- ##### MACRO G_ASCII_DTOSTR_BUF_SIZE ##### -->
<para>
A good size for a buffer to be passed into g_ascii_dtostr().
It is guaranteed to be enough for all output of that function on systems with
 64bit IEEE-compatible doubles.
</para>
<para>
The typical usage would be something like:
<informalexample><programlisting>
  char buf[G_ASCII_DTOSTR_BUF_SIZE];

  fprintf (out, "value=&percnt;s\n", g_ascii_dtostr (buf, sizeof (buf), value));
</programlisting></informalexample>
</para>



<!-- ##### FUNCTION g_ascii_strtod ##### -->
<para>

</para>

@nptr: 
@endptr: 
@Returns: 


<!-- ##### FUNCTION g_ascii_dtostr ##### -->
<para>

</para>

@buffer: 
@buf_len: 
@d: 
@Returns: 


<!-- ##### FUNCTION g_ascii_formatd ##### -->
<para>

</para>

@buffer: 
@buf_len: 
@format: 
@d: 
@Returns: 


<!-- ##### FUNCTION g_strtod ##### -->
<para>

</para>

@nptr: 
@endptr: 
@Returns: 


<!-- ##### FUNCTION g_strchug ##### -->
<para>
Removes leading whitespace from a string, by moving the rest of the
characters forward.
</para>
<para>
This function doesn't allocate or reallocate any memory; it modifies @string
in place. The pointer to @string is returned to allow the nesting of functions.
</para>
<para>
Also see g_strchomp() and g_strstrip().
</para>

@string: a string to remove the leading whitespace from.
@Returns: @string.


<!-- ##### FUNCTION g_strchomp ##### -->
<para>
Removes trailing whitespace from a string.
</para>
<para>
This function doesn't allocate or reallocate any memory; it modifies @string in
place. The pointer to @string is returned to allow the nesting of functions.
</para>
<para>
Also see g_strchug() and g_strstrip().
</para>

@string: a string to remove the trailing whitespace from.
@Returns: @string.


<!-- ##### MACRO g_strstrip ##### -->
<para>
Removes leading and trailing whitespace from a string. See g_strchomp() and
g_strchug().
</para>

@string: a string to remove the leading and trailing whitespace from.


<!-- ##### FUNCTION g_strdelimit ##### -->
<para>
Converts any delimiter characters in @string to @new_delimiter.
Any characters in @string which are found in @delimiters are changed
to the @new_delimiter character. Modifies @string in place, and returns 
@string itself, not a copy. The return value is to allow nesting such as
<literal>g_ascii_strup (g_strdelimit (str, "abc", '?'))</literal>.
</para>

@string: the string to convert.
@delimiters: a string containing the current delimiters, or %NULL to use the
standard delimiters defined in #G_STR_DELIMITERS.
@new_delimiter: the new delimiter character.
@Returns: @string.


<!-- ##### MACRO G_STR_DELIMITERS ##### -->
<para>
The standard delimiters, used in g_strdelimit().
</para>



<!-- ##### FUNCTION g_strescape ##### -->
<para>
Escapes the special characters '\b', '\f', '\n', '\r', '\t', '\' and
'&quot;' in the string @source by inserting a '\' before
them. Additionally all characters in the range 0x01-0x1F (everything
below SPACE) and in the range 0x7F-0xFF (all non-ASCII chars) are
replaced with a '\' followed by their octal representation. Characters
supplied in @exceptions are not escaped.
</para>

<para>
g_strcompress() does the reverse conversion.
</para>

@source: a string to escape.
@exceptions: a string of characters not to escape in @source.
@Returns: a newly-allocated copy of @source with certain
characters escaped. See above.


<!-- ##### FUNCTION g_strcompress ##### -->
<para>
Replaces all escaped characters with their one byte equivalent. It
does the reverse conversion of g_strescape(). 
</para>

@source: a string to compress.
@Returns: a newly-allocated copy of @source with all escaped 
character compressed.


<!-- ##### FUNCTION g_strcanon ##### -->
<para>
For each character in @string, if the character is not in @valid_chars,
replaces the character with @substitutor. Modifies @string in place, 
and return @string itself, not a copy. The return value is to allow
nesting such as <literal>g_ascii_strup (g_strcanon (str, "abc", '?'))</literal>.
</para>

@string: a nul-terminated array of bytes.
@valid_chars: bytes permitted in @string.
@substitutor: replacement character for disallowed bytes.
@Returns: @string.


<!-- ##### FUNCTION g_strsplit ##### -->
<para>
</para>

@string: 
@delimiter: 
@max_tokens: 
@Returns: 


<!-- ##### FUNCTION g_strsplit_set ##### -->
<para>

</para>

@string: 
@delimiters: 
@max_tokens: 
@Returns: 


<!-- ##### FUNCTION g_strfreev ##### -->
<para>

</para>

@str_array: 


<!-- ##### FUNCTION g_strconcat ##### -->
<para>
Concatenates all of the given strings into one long string.  The returned string
should be freed when no longer needed.  
</para>

<warning><para>
The variable argument list <emphasis>must</emphasis> end with %NULL. 
If you forget the %NULL, g_strconcat() will start appending
random memory junk to your string.
</para></warning>

@string1: The first string to add, which must not be %NULL.
@Varargs: a %NULL-terminated list of strings to append to the string.
@Returns: a newly-allocated string containing all the string arguments.


<!-- ##### FUNCTION g_strjoin ##### -->
<para>
Joins a number of strings together to form one long string, with the optional
@separator inserted between each of them.
</para>

@separator: a string to insert between each of the strings, or %NULL.
@Varargs: a %NULL-terminated list of strings to join.
@Returns: a newly-allocated string containing all of the strings joined
together, with @separator between them.


<!-- ##### FUNCTION g_strjoinv ##### -->
<para>
Joins a number of strings together to form one long string, with the optional
@separator inserted between each of them.
</para>

@separator: a string to insert between each of the strings, or %NULL.
@str_array: a %NULL-terminated array of strings to join.
@Returns: a newly-allocated string containing all of the strings joined
together, with @separator between them.


<!-- ##### FUNCTION g_strv_length ##### -->
<para>

</para>

@str_array: 
@Returns: 


<!-- ##### FUNCTION g_strerror ##### -->
<para>
Returns a string corresponding to the given error code, e.g. "no such process".
This function is included since not all platforms support the 
strerror() function.
</para>

@errnum: the system error number. See the standard C %errno
documentation.
@Returns: a string describing the error code.
If the error code is unknown, it returns "unknown error (&lt;code&gt;)".
The string can only be used until the next call to g_strerror().


<!-- ##### FUNCTION g_strsignal ##### -->
<para>
Returns a string describing the given signal, e.g. "Segmentation fault".
This function is included since not all platforms support the
strsignal() function.
</para>

@signum: the signal number. See the <literal>signal</literal>
documentation.
@Returns: a string describing the signal.
If the signal is unknown, it returns "unknown signal (&lt;signum&gt;)".
The string can only be used until the next call to g_strsignal().