]> Pileus Git - ~andy/fetchmail/blob - trio/triostr.h
Update trio to CVS checkout of 2009-07-02.
[~andy/fetchmail] / trio / triostr.h
1 /*************************************************************************
2  *
3  * $Id: triostr.h,v 1.17 2007/11/11 13:21:49 breese Exp $
4  *
5  * Copyright (C) 2001 Bjorn Reese and Daniel Stenberg.
6  *
7  * Permission to use, copy, modify, and distribute this software for any
8  * purpose with or without fee is hereby granted, provided that the above
9  * copyright notice and this permission notice appear in all copies.
10  *
11  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
12  * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
13  * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
14  * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
15  *
16  ************************************************************************/
17
18 #ifndef TRIO_TRIOSTR_H
19 #define TRIO_TRIOSTR_H
20
21 /*
22  * Documentation is located in triostr.c
23  */
24
25 #include <assert.h>
26 #include <stdlib.h>
27 #include <string.h>
28 #include <time.h>
29 #include "triodef.h"
30 #include "triop.h"
31
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35
36 enum {
37   TRIO_HASH_NONE = 0,
38   TRIO_HASH_PLAIN,
39   TRIO_HASH_TWOSIGNED
40 };
41
42 #if !defined(TRIO_PUBLIC_STRING)
43 # if !defined(TRIO_PUBLIC)
44 #  define TRIO_PUBLIC
45 # endif
46 # define TRIO_PUBLIC_STRING TRIO_PUBLIC
47 #endif
48
49 /*************************************************************************
50  * Dependencies
51  */
52
53 #if defined(TRIO_EMBED_STRING)
54
55 /*
56  * The application that triostr is embedded in must define which functions
57  * it uses.
58  *
59  * The following resolves internal dependencies.
60  */
61   
62 # if defined(TRIO_FUNC_XSTRING_SET)
63 #  if !defined(TRIO_FUNC_DUPLICATE)
64 #   define TRIO_FUNC_DUPLICATE
65 #  endif
66 # endif
67
68 # if defined(TRIO_FUNC_DUPLICATE) \
69   || defined(TRIO_FUNC_DUPLICATE_MAX) \
70   || defined(TRIO_FUNC_STRING_DUPLICATE) \
71   || defined(TRIO_FUNC_XSTRING_DUPLICATE)
72 #  if !defined(TRIO_FUNC_CREATE)
73 #   define TRIO_FUNC_CREATE
74 #  endif
75 #  if !defined(TRIO_FUNC_COPY_MAX)
76 #   define TRIO_FUNC_COPY_MAX
77 #  endif
78 # endif
79
80 # if defined(TRIO_FUNC_STRING_CREATE)
81 #  if !defined(TRIO_FUNC_STRING_DESTROY)
82 #   define TRIO_FUNC_STRING_DESTROY
83 #  endif
84 # endif
85
86 # if defined(TRIO_FUNC_STRING_DESTROY) \
87   || defined(TRIO_FUNC_XSTRING_SET)
88 #  if !defined(TRIO_FUNC_DESTROY)
89 #   define TRIO_FUNC_DESTROY
90 #  endif
91 # endif
92
93 # if defined(TRIO_FUNC_EQUAL_LOCALE) \
94   || defined(TRIO_FUNC_STRING_EQUAL) \
95   || defined(TRIO_FUNC_XSTRING_EQUAL)
96 #  if !defined(TRIO_FUNC_EQUAL)
97 #   define TRIO_FUNC_EQUAL
98 #  endif
99 # endif
100
101 # if defined(TRIO_FUNC_EQUAL_CASE) \
102   || defined(TRIO_FUNC_STRING_EQUAL_CASE) \
103   || defined(TRIO_FUNC_XSTRING_EQUAL_CASE)
104 #  if !defined(TRIO_FUNC_EQUAL_CASE)
105 #   define TRIO_FUNC_EQUAL_CASE
106 #  endif
107 # endif
108
109 # if defined(TRIO_FUNC_SUBSTRING_MAX) \
110   || defined(TRIO_FUNC_STRING_EQUAL_MAX) \
111   || defined(TRIO_FUNC_XSTRING_EQUAL_MAX)
112 #  if !defined(TRIO_FUNC_EQUAL_MAX)
113 #   define TRIO_FUNC_EQUAL_MAX
114 #  endif
115 # endif
116
117 # if defined(TRIO_FUNC_TO_DOUBLE) \
118   || defined(TRIO_FUNC_TO_FLOAT)
119 #  if !defined(TRIO_FUNC_TO_LONG_DOUBLE)
120 #   define TRIO_FUNC_TO_LONG_DOUBLE
121 #  endif
122 # endif
123
124 # if defined(TRIO_FUNC_STRING_TERMINATE)
125 #  if !defined(TRIO_FUNC_XSTRING_APPEND_CHAR)
126 #   define TRIO_FUNC_XSTRING_APPEND_CHAR
127 #  endif
128 # endif
129
130 # if defined(TRIO_FUNC_XSTRING_APPEND_CHAR)
131 #  if !defined(TRIO_FUNC_STRING_SIZE)
132 #   define TRIO_FUNC_STRING_SIZE
133 #  endif
134 # endif
135
136 #else
137
138 /*
139  * When triostr is not embedded all functions are defined.
140  */
141
142 # define TRIO_FUNC_APPEND
143 # define TRIO_FUNC_APPEND_MAX
144 # define TRIO_FUNC_CONTAINS
145 # define TRIO_FUNC_COPY
146 # define TRIO_FUNC_COPY_MAX
147 # define TRIO_FUNC_CREATE
148 # define TRIO_FUNC_DESTROY
149 # define TRIO_FUNC_DUPLICATE
150 # define TRIO_FUNC_DUPLICATE_MAX
151 # define TRIO_FUNC_EQUAL
152 # define TRIO_FUNC_EQUAL_CASE
153 # define TRIO_FUNC_EQUAL_CASE_MAX
154 # define TRIO_FUNC_EQUAL_LOCALE
155 # define TRIO_FUNC_EQUAL_MAX
156 # define TRIO_FUNC_ERROR
157 # if !defined(TRIO_PLATFORM_WINCE)
158 #  define TRIO_FUNC_FORMAT_DATE_MAX
159 # endif
160 # define TRIO_FUNC_HASH
161 # define TRIO_FUNC_INDEX
162 # define TRIO_FUNC_INDEX_LAST
163 # define TRIO_FUNC_LENGTH
164 # define TRIO_FUNC_LENGTH_MAX
165 # define TRIO_FUNC_LOWER
166 # define TRIO_FUNC_MATCH
167 # define TRIO_FUNC_MATCH_CASE
168 # define TRIO_FUNC_SPAN_FUNCTION
169 # define TRIO_FUNC_SUBSTRING
170 # define TRIO_FUNC_SUBSTRING_MAX
171 # define TRIO_FUNC_TO_DOUBLE
172 # define TRIO_FUNC_TO_FLOAT
173 # define TRIO_FUNC_TO_LONG
174 # define TRIO_FUNC_TO_LONG_DOUBLE
175 # define TRIO_FUNC_TO_LOWER
176 # define TRIO_FUNC_TO_UNSIGNED_LONG
177 # define TRIO_FUNC_TO_UPPER
178 # define TRIO_FUNC_TOKENIZE
179 # define TRIO_FUNC_UPPER
180
181 # define TRIO_FUNC_STRING_APPEND
182 # define TRIO_FUNC_STRING_CONTAINS
183 # define TRIO_FUNC_STRING_COPY
184 # define TRIO_FUNC_STRING_CREATE
185 # define TRIO_FUNC_STRING_DESTROY
186 # define TRIO_FUNC_STRING_DUPLICATE
187 # define TRIO_FUNC_STRING_EQUAL
188 # define TRIO_FUNC_STRING_EQUAL_CASE
189 # define TRIO_FUNC_STRING_EQUAL_CASE_MAX
190 # define TRIO_FUNC_STRING_EQUAL_MAX
191 # define TRIO_FUNC_STRING_EXTRACT
192 # if !defined(TRIO_PLATFORM_WINCE)
193 #  define TRIO_FUNC_STRING_FORMAT_DATE_MAX
194 # endif
195 # define TRIO_FUNC_STRING_GET
196 # define TRIO_FUNC_STRING_INDEX
197 # define TRIO_FUNC_STRING_INDEX_LAST
198 # define TRIO_FUNC_STRING_LENGTH
199 # define TRIO_FUNC_STRING_LOWER
200 # define TRIO_FUNC_STRING_MATCH
201 # define TRIO_FUNC_STRING_MATCH_CASE
202 # define TRIO_FUNC_STRING_SIZE
203 # define TRIO_FUNC_STRING_SUBSTRING
204 # define TRIO_FUNC_STRING_TERMINATE
205 # define TRIO_FUNC_STRING_UPPER
206
207 # define TRIO_FUNC_XSTRING_APPEND
208 # define TRIO_FUNC_XSTRING_APPEND_CHAR
209 # define TRIO_FUNC_XSTRING_CONTAINS
210 # define TRIO_FUNC_XSTRING_COPY
211 # define TRIO_FUNC_XSTRING_DUPLICATE
212 # define TRIO_FUNC_XSTRING_EQUAL
213 # define TRIO_FUNC_XSTRING_EQUAL_CASE
214 # define TRIO_FUNC_XSTRING_EQUAL_CASE_MAX
215 # define TRIO_FUNC_XSTRING_EQUAL_MAX
216 # define TRIO_FUNC_XSTRING_MATCH
217 # define TRIO_FUNC_XSTRING_MATCH_CASE
218 # define TRIO_FUNC_XSTRING_SET
219 # define TRIO_FUNC_XSTRING_SUBSTRING
220
221 #endif
222
223
224 /*************************************************************************
225  * String functions
226  */
227
228 #if defined(TRIO_FUNC_APPEND)
229 TRIO_PUBLIC_STRING int
230 trio_append
231 TRIO_PROTO((char *target, TRIO_CONST char *source));
232 #endif
233
234 #if defined(TRIO_FUNC_APPEND_MAX)
235 TRIO_PUBLIC_STRING int
236 trio_append_max
237 TRIO_PROTO((char *target, size_t max, TRIO_CONST char *source));
238 #endif
239
240 #if defined(TRIO_FUNC_CONTAINS)
241 TRIO_PUBLIC_STRING int
242 trio_contains
243 TRIO_PROTO((TRIO_CONST char *string, TRIO_CONST char *substring));
244 #endif
245
246 #if defined(TRIO_FUNC_COPY)
247 TRIO_PUBLIC_STRING int
248 trio_copy
249 TRIO_PROTO((char *target, TRIO_CONST char *source));
250 #endif
251
252 #if defined(TRIO_FUNC_COPY_MAX)
253 TRIO_PUBLIC_STRING int
254 trio_copy_max
255 TRIO_PROTO((char *target, size_t max, TRIO_CONST char *source));
256 #endif
257
258 #if defined(TRIO_FUNC_CREATE)
259 TRIO_PUBLIC_STRING char *
260 trio_create
261 TRIO_PROTO((size_t size));
262 #endif
263
264 #if defined(TRIO_FUNC_DESTROY)
265 TRIO_PUBLIC_STRING void
266 trio_destroy
267 TRIO_PROTO((char *string));
268 #endif
269
270 #if defined(TRIO_FUNC_DUPLICATE)
271 TRIO_PUBLIC_STRING char *
272 trio_duplicate
273 TRIO_PROTO((TRIO_CONST char *source));
274 #endif
275
276 #if defined(TRIO_FUNC_DUPLICATE_MAX)
277 TRIO_PUBLIC_STRING char *
278 trio_duplicate_max
279 TRIO_PROTO((TRIO_CONST char *source, size_t max));
280 #endif
281
282 #if defined(TRIO_FUNC_EQUAL)
283 TRIO_PUBLIC_STRING int
284 trio_equal
285 TRIO_PROTO((TRIO_CONST char *first, TRIO_CONST char *second));
286 #endif
287
288 #if defined(TRIO_FUNC_EQUAL_CASE)
289 TRIO_PUBLIC_STRING int
290 trio_equal_case
291 TRIO_PROTO((TRIO_CONST char *first, TRIO_CONST char *second));
292 #endif
293
294 #if defined(TRIO_FUNC_EQUAL_CASE_MAX)
295 TRIO_PUBLIC_STRING int
296 trio_equal_case_max
297 TRIO_PROTO((TRIO_CONST char *first, size_t max, TRIO_CONST char *second));
298 #endif
299
300 #if defined(TRIO_FUNC_EQUAL_LOCALE)
301 TRIO_PUBLIC_STRING int
302 trio_equal_locale
303 TRIO_PROTO((TRIO_CONST char *first, TRIO_CONST char *second));
304 #endif
305
306 #if defined(TRIO_FUNC_EQUAL_MAX)
307 TRIO_PUBLIC_STRING int
308 trio_equal_max
309 TRIO_PROTO((TRIO_CONST char *first, size_t max, TRIO_CONST char *second));
310 #endif
311
312 #if defined(TRIO_FUNC_ERROR)
313 TRIO_PUBLIC_STRING TRIO_CONST char *
314 trio_error
315 TRIO_PROTO((int));
316 #endif
317
318 #if defined(TRIO_FUNC_FORMAT_DATE_MAX)
319 TRIO_PUBLIC_STRING size_t
320 trio_format_date_max
321 TRIO_PROTO((char *target, size_t max, TRIO_CONST char *format, TRIO_CONST struct tm *datetime));
322 #endif
323
324 #if defined(TRIO_FUNC_HASH)
325 TRIO_PUBLIC_STRING unsigned long
326 trio_hash
327 TRIO_PROTO((TRIO_CONST char *string, int type));
328 #endif
329
330 #if defined(TRIO_FUNC_INDEX)
331 TRIO_PUBLIC_STRING char *
332 trio_index
333 TRIO_PROTO((TRIO_CONST char *string, int character));
334 #endif
335
336 #if defined(TRIO_FUNC_INDEX_LAST)
337 TRIO_PUBLIC_STRING char *
338 trio_index_last
339 TRIO_PROTO((TRIO_CONST char *string, int character));
340 #endif
341
342 #if defined(TRIO_FUNC_LENGTH)
343 TRIO_PUBLIC_STRING size_t
344 trio_length
345 TRIO_PROTO((TRIO_CONST char *string));
346 #endif
347
348 #if defined(TRIO_FUNC_LENGTH_MAX)
349 TRIO_PUBLIC_STRING size_t
350 trio_length_max
351 TRIO_PROTO((TRIO_CONST char *string, size_t max));
352 #endif
353
354 #if defined(TRIO_FUNC_LOWER)
355 TRIO_PUBLIC_STRING int
356 trio_lower
357 TRIO_PROTO((char *target));
358 #endif
359
360 #if defined(TRIO_FUNC_MATCH)
361 TRIO_PUBLIC_STRING int
362 trio_match
363 TRIO_PROTO((TRIO_CONST char *string, TRIO_CONST char *pattern));
364 #endif
365
366 #if defined(TRIO_FUNC_MATCH_CASE)
367 TRIO_PUBLIC_STRING int
368 trio_match_case
369 TRIO_PROTO((TRIO_CONST char *string, TRIO_CONST char *pattern));
370 #endif
371
372 #if defined(TRIO_FUNC_SPAN_FUNCTION)
373 TRIO_PUBLIC_STRING size_t
374 trio_span_function
375 TRIO_PROTO((char *target, TRIO_CONST char *source, int (*Function) TRIO_PROTO((int))));
376 #endif
377
378 #if defined(TRIO_FUNC_SUBSTRING)
379 TRIO_PUBLIC_STRING char *
380 trio_substring
381 TRIO_PROTO((TRIO_CONST char *string, TRIO_CONST char *substring));
382 #endif
383
384 #if defined(TRIO_FUNC_SUBSTRING_MAX)
385 TRIO_PUBLIC_STRING char *
386 trio_substring_max
387 TRIO_PROTO((TRIO_CONST char *string, size_t max, TRIO_CONST char *substring));
388 #endif
389
390 #if defined(TRIO_FUNC_TO_DOUBLE)
391 TRIO_PUBLIC_STRING double
392 trio_to_double
393 TRIO_PROTO((TRIO_CONST char *source, char **endp));
394 #endif
395
396 #if defined(TRIO_FUNC_TO_FLOAT)
397 TRIO_PUBLIC_STRING float
398 trio_to_float
399 TRIO_PROTO((TRIO_CONST char *source, char **endp));
400 #endif
401
402 #if defined(TRIO_FUNC_TO_LONG)
403 TRIO_PUBLIC_STRING long
404 trio_to_long
405 TRIO_PROTO((TRIO_CONST char *source, char **endp, int base));
406 #endif
407
408 #if defined(TRIO_FUNC_TO_LOWER)
409 TRIO_PUBLIC_STRING int
410 trio_to_lower
411 TRIO_PROTO((int source));
412 #endif
413
414 #if defined(TRIO_FUNC_TO_LONG_DOUBLE)
415 TRIO_PUBLIC_STRING trio_long_double_t
416 trio_to_long_double
417 TRIO_PROTO((TRIO_CONST char *source, char **endp));
418 #endif
419
420 #if defined(TRIO_FUNC_TO_UNSIGNED_LONG)
421 TRIO_PUBLIC_STRING unsigned long
422 trio_to_unsigned_long
423 TRIO_PROTO((TRIO_CONST char *source, char **endp, int base));
424 #endif
425
426 #if defined(TRIO_FUNC_TO_UPPER)
427 TRIO_PUBLIC_STRING int
428 trio_to_upper
429 TRIO_PROTO((int source));
430 #endif
431
432 #if defined(TRIO_FUNC_TOKENIZE)
433 TRIO_PUBLIC_STRING char *
434 trio_tokenize
435 TRIO_PROTO((char *string, TRIO_CONST char *delimiters));
436 #endif
437
438 #if defined(TRIO_FUNC_UPPER)
439 TRIO_PUBLIC_STRING int
440 trio_upper
441 TRIO_PROTO((char *target));
442 #endif
443
444 /*************************************************************************
445  * Dynamic string functions
446  */
447
448 /*
449  * Opaque type for dynamic strings
450  */
451
452 typedef struct _trio_string_t trio_string_t;
453
454 #if defined(TRIO_FUNC_STRING_APPEND)
455 TRIO_PUBLIC_STRING int
456 trio_string_append
457 TRIO_PROTO((trio_string_t *self, trio_string_t *other));
458 #endif
459
460 #if defined(TRIO_FUNC_STRING_CONTAINS)
461 TRIO_PUBLIC_STRING int
462 trio_string_contains
463 TRIO_PROTO((trio_string_t *self, trio_string_t *other));
464 #endif
465
466 #if defined(TRIO_FUNC_STRING_COPY)
467 TRIO_PUBLIC_STRING int
468 trio_string_copy
469 TRIO_PROTO((trio_string_t *self, trio_string_t *other));
470 #endif
471
472 #if defined(TRIO_FUNC_STRING_CREATE)
473 TRIO_PUBLIC_STRING trio_string_t *
474 trio_string_create
475 TRIO_PROTO((int initial_size));
476 #endif
477
478 #if defined(TRIO_FUNC_STRING_DESTROY)
479 TRIO_PUBLIC_STRING void
480 trio_string_destroy
481 TRIO_PROTO((trio_string_t *self));
482 #endif
483
484 #if defined(TRIO_FUNC_STRING_DUPLICATE)
485 TRIO_PUBLIC_STRING trio_string_t *
486 trio_string_duplicate
487 TRIO_PROTO((trio_string_t *other));
488 #endif
489
490 #if defined(TRIO_FUNC_STRING_EQUAL)
491 TRIO_PUBLIC_STRING int
492 trio_string_equal
493 TRIO_PROTO((trio_string_t *self, trio_string_t *other));
494 #endif
495
496 #if defined(TRIO_FUNC_STRING_EQUAL_MAX)
497 TRIO_PUBLIC_STRING int
498 trio_string_equal_max
499 TRIO_PROTO((trio_string_t *self, size_t max, trio_string_t *second));
500 #endif
501
502 #if defined(TRIO_FUNC_STRING_EQUAL_CASE)
503 TRIO_PUBLIC_STRING int
504 trio_string_equal_case
505 TRIO_PROTO((trio_string_t *self, trio_string_t *other));
506 #endif
507
508 #if defined(TRIO_FUNC_STRING_EQUAL_CASE_MAX)
509 TRIO_PUBLIC_STRING int
510 trio_string_equal_case_max
511 TRIO_PROTO((trio_string_t *self, size_t max, trio_string_t *other));
512 #endif
513
514 #if defined(TRIO_FUNC_STRING_EXTRACT)
515 TRIO_PUBLIC_STRING char *
516 trio_string_extract
517 TRIO_PROTO((trio_string_t *self));
518 #endif
519
520 #if defined(TRIO_FUNC_STRING_FORMAT_DATE_MAX)
521 TRIO_PUBLIC_STRING size_t
522 trio_string_format_date_max
523 TRIO_PROTO((trio_string_t *self, size_t max, TRIO_CONST char *format, TRIO_CONST struct tm *datetime));
524 #endif
525
526 #if defined(TRIO_FUNC_STRING_GET)
527 TRIO_PUBLIC_STRING char *
528 trio_string_get
529 TRIO_PROTO((trio_string_t *self, int offset));
530 #endif
531
532 #if defined(TRIO_FUNC_STRING_INDEX)
533 TRIO_PUBLIC_STRING char *
534 trio_string_index
535 TRIO_PROTO((trio_string_t *self, int character));
536 #endif
537
538 #if defined(TRIO_FUNC_STRING_INDEX_LAST)
539 TRIO_PUBLIC_STRING char *
540 trio_string_index_last
541 TRIO_PROTO((trio_string_t *self, int character));
542 #endif
543
544 #if defined(TRIO_FUNC_STRING_LENGTH)
545 TRIO_PUBLIC_STRING int
546 trio_string_length
547 TRIO_PROTO((trio_string_t *self));
548 #endif
549
550 #if defined(TRIO_FUNC_STRING_LOWER)
551 TRIO_PUBLIC_STRING int
552 trio_string_lower
553 TRIO_PROTO((trio_string_t *self));
554 #endif
555
556 #if defined(TRIO_FUNC_STRING_MATCH)
557 TRIO_PUBLIC_STRING int
558 trio_string_match
559 TRIO_PROTO((trio_string_t *self, trio_string_t *other));
560 #endif
561
562 #if defined(TRIO_FUNC_STRING_MATCH_CASE)
563 TRIO_PUBLIC_STRING int
564 trio_string_match_case
565 TRIO_PROTO((trio_string_t *self, trio_string_t *other));
566 #endif
567
568 #if defined(TRIO_FUNC_STRING_SIZE)
569 TRIO_PUBLIC_STRING int
570 trio_string_size
571 TRIO_PROTO((trio_string_t *self));
572 #endif
573
574 #if defined(TRIO_FUNC_STRING_SUBSTRING)
575 TRIO_PUBLIC_STRING char *
576 trio_string_substring
577 TRIO_PROTO((trio_string_t *self, trio_string_t *other));
578 #endif
579
580 #if defined(TRIO_FUNC_STRING_TERMINATE)
581 TRIO_PUBLIC_STRING void
582 trio_string_terminate
583 TRIO_PROTO((trio_string_t *self));
584 #endif
585
586 #if defined(TRIO_FUNC_STRING_UPPER)
587 TRIO_PUBLIC_STRING int
588 trio_string_upper
589 TRIO_PROTO((trio_string_t *self));
590 #endif
591
592 #if defined(TRIO_FUNC_XSTRING_APPEND)
593 TRIO_PUBLIC_STRING int
594 trio_xstring_append
595 TRIO_PROTO((trio_string_t *self, TRIO_CONST char *other));
596 #endif
597
598 #if defined(TRIO_FUNC_XSTRING_APPEND_CHAR)
599 TRIO_PUBLIC_STRING int
600 trio_xstring_append_char
601 TRIO_PROTO((trio_string_t *self, char character));
602 #endif
603
604 #if defined(TRIO_FUNC_XSTRING_CONTAINS)
605 TRIO_PUBLIC_STRING int
606 trio_xstring_contains
607 TRIO_PROTO((trio_string_t *self, TRIO_CONST char *other));
608 #endif
609
610 #if defined(TRIO_FUNC_XSTRING_COPY)
611 TRIO_PUBLIC_STRING int
612 trio_xstring_copy
613 TRIO_PROTO((trio_string_t *self, TRIO_CONST char *other));
614 #endif
615
616 #if defined(TRIO_FUNC_XSTRING_DUPLICATE)
617 TRIO_PUBLIC_STRING trio_string_t *
618 trio_xstring_duplicate
619 TRIO_PROTO((TRIO_CONST char *other));
620 #endif
621
622 #if defined(TRIO_FUNC_XSTRING_EQUAL)
623 TRIO_PUBLIC_STRING int
624 trio_xstring_equal
625 TRIO_PROTO((trio_string_t *self, TRIO_CONST char *other));
626 #endif
627
628 #if defined(TRIO_FUNC_XSTRING_EQUAL_MAX)
629 TRIO_PUBLIC_STRING int
630 trio_xstring_equal_max
631 TRIO_PROTO((trio_string_t *self, size_t max, TRIO_CONST char *other));
632 #endif
633
634 #if defined(TRIO_FUNC_XSTRING_EQUAL_CASE)
635 TRIO_PUBLIC_STRING int
636 trio_xstring_equal_case
637 TRIO_PROTO((trio_string_t *self, TRIO_CONST char *other));
638 #endif
639
640 #if defined(TRIO_FUNC_XSTRING_EQUAL_CASE_MAX)
641 TRIO_PUBLIC_STRING int
642 trio_xstring_equal_case_max
643 TRIO_PROTO((trio_string_t *self, size_t max, TRIO_CONST char *other));
644 #endif
645
646 #if defined(TRIO_FUNC_XSTRING_MATCH)
647 TRIO_PUBLIC_STRING int
648 trio_xstring_match
649 TRIO_PROTO((trio_string_t *self, TRIO_CONST char *other));
650 #endif
651
652 #if defined(TRIO_FUNC_XSTRING_MATCH_CASE)
653 TRIO_PUBLIC_STRING int
654 trio_xstring_match_case
655 TRIO_PROTO((trio_string_t *self, TRIO_CONST char *other));
656 #endif
657
658 #if defined(TRIO_FUNC_XSTRING_SET)
659 TRIO_PUBLIC_STRING void
660 trio_xstring_set
661 TRIO_PROTO((trio_string_t *self, char *buffer));
662 #endif
663
664 #if defined(TRIO_FUNC_XSTRING_SUBSTRING)
665 TRIO_PUBLIC_STRING char *
666 trio_xstring_substring
667 TRIO_PROTO((trio_string_t *self, TRIO_CONST char *other));
668 #endif
669
670 #ifdef __cplusplus
671 }
672 #endif
673
674 #endif /* TRIO_TRIOSTR_H */