(ice9_sources): Add gap-buffer.scm.
[bpt/guile.git] / srfi / srfi-13.h
CommitLineData
653c7291
MG
1#ifndef SCM_SRFI_13_H
2#define SCM_SRFI_13_H
3/* srfi-13.c --- SRFI-13 procedures for Guile
4 *
5 * Copyright (C) 2001 Free Software Foundation, Inc.
8c67d05c 6 *
653c7291
MG
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation; either version 2, or (at
10 * your option) any later version.
8c67d05c 11 *
653c7291
MG
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
8c67d05c 16 *
653c7291
MG
17 * You should have received a copy of the GNU General Public License
18 * along with this software; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
20 * Boston, MA 02111-1307 USA
21 *
22 * As a special exception, the Free Software Foundation gives
23 * permission for additional uses of the text contained in its release
24 * of GUILE.
25 *
26 * The exception is that, if you link the GUILE library with other
27 * files to produce an executable, this does not by itself cause the
28 * resulting executable to be covered by the GNU General Public
29 * License. Your use of that executable is in no way restricted on
30 * account of linking the GUILE library code into it.
31 *
32 * This exception does not however invalidate any other reasons why
33 * the executable file might be covered by the GNU General Public
34 * License.
35 *
36 * This exception applies only to the code released by the Free
37 * Software Foundation under the name GUILE. If you copy code from
38 * other Free Software Foundation releases into a copy of GUILE, as
39 * the General Public License permits, the exception does not apply to
40 * the code that you add in this way. To avoid misleading anyone as
41 * to the status of such modified files, you must delete this
42 * exception notice from them.
43 *
44 * If you write modifications of your own for GUILE, it is your choice
45 * whether to permit this exception to apply to your modifications.
46 * If you do not wish that, delete this exception notice. */
47\f
48
88a93471
MV
49/* SCM_SRFI1314_API is a macro prepended to all function and data definitions
50 which should be exported or imported in the resulting dynamic link
51 library in the Win32 port. */
653c7291 52
8f99e3f3 53#if defined (SCM_SRFI1314_IMPORT)
88a93471 54# define SCM_SRFI1314_API __declspec (dllimport) extern
8f99e3f3 55#elif defined (SCM_SRFI1314_EXPORT) || defined (DLL_EXPORT)
88a93471
MV
56# define SCM_SRFI1314_API __declspec (dllexport) extern
57#else
58# define SCM_SRFI1314_API extern
59#endif
60
61SCM_SRFI1314_API void scm_init_srfi_13 (void);
62SCM_SRFI1314_API void scm_init_srfi_13_14 (void);
63
64SCM_SRFI1314_API SCM scm_string_any (SCM pred, SCM s, SCM start, SCM end);
65SCM_SRFI1314_API SCM scm_string_every (SCM pred, SCM s, SCM start, SCM end);
66SCM_SRFI1314_API SCM scm_string_tabulate (SCM proc, SCM len);
67SCM_SRFI1314_API SCM scm_string_to_listS (SCM str, SCM start, SCM end);
68SCM_SRFI1314_API SCM scm_reverse_list_to_string (SCM chrs);
69SCM_SRFI1314_API SCM scm_string_join (SCM ls, SCM delimiter, SCM grammar);
70SCM_SRFI1314_API SCM scm_string_copyS (SCM str, SCM start, SCM end);
71SCM_SRFI1314_API SCM scm_substring_shared (SCM str, SCM start, SCM end);
72SCM_SRFI1314_API SCM scm_string_copy_x (SCM target, SCM tstart, SCM s, SCM start, SCM end);
73SCM_SRFI1314_API SCM scm_string_take (SCM s, SCM n);
74SCM_SRFI1314_API SCM scm_string_drop (SCM s, SCM n);
75SCM_SRFI1314_API SCM scm_string_take_right (SCM s, SCM n);
76SCM_SRFI1314_API SCM scm_string_drop_right (SCM s, SCM n);
77SCM_SRFI1314_API SCM scm_string_pad (SCM s, SCM len, SCM chr, SCM start, SCM end);
78SCM_SRFI1314_API SCM scm_string_pad_right (SCM s, SCM len, SCM chr, SCM start, SCM end);
79SCM_SRFI1314_API SCM scm_string_trim (SCM s, SCM char_pred, SCM start, SCM end);
80SCM_SRFI1314_API SCM scm_string_trim_right (SCM s, SCM char_pred, SCM start, SCM end);
81SCM_SRFI1314_API SCM scm_string_trim_both (SCM s, SCM char_pred, SCM start, SCM end);
82SCM_SRFI1314_API SCM scm_string_fill_xS (SCM str, SCM chr, SCM start, SCM end);
83SCM_SRFI1314_API SCM scm_string_compare (SCM s1, SCM s2, SCM proc_lt, SCM proc_eq, SCM proc_gt, SCM start1, SCM end1, SCM start2, SCM end2);
84SCM_SRFI1314_API SCM scm_string_compare_ci (SCM s1, SCM s2, SCM proc_lt, SCM proc_eq, SCM proc_gt, SCM start1, SCM end1, SCM start2, SCM end2);
85SCM_SRFI1314_API SCM scm_string_eq (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
86SCM_SRFI1314_API SCM scm_string_neq (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
87SCM_SRFI1314_API SCM scm_string_lt (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
88SCM_SRFI1314_API SCM scm_string_gt (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
89SCM_SRFI1314_API SCM scm_string_le (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
90SCM_SRFI1314_API SCM scm_string_ge (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
91SCM_SRFI1314_API SCM scm_string_ci_eq (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
92SCM_SRFI1314_API SCM scm_string_ci_neq (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
93SCM_SRFI1314_API SCM scm_string_ci_lt (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
94SCM_SRFI1314_API SCM scm_string_ci_gt (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
95SCM_SRFI1314_API SCM scm_string_ci_le (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
96SCM_SRFI1314_API SCM scm_string_ci_ge (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
97SCM_SRFI1314_API SCM scm_string_prefix_length (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
98SCM_SRFI1314_API SCM scm_string_prefix_length_ci (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
99SCM_SRFI1314_API SCM scm_string_suffix_length (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
100SCM_SRFI1314_API SCM scm_string_suffix_length_ci (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
101SCM_SRFI1314_API SCM scm_string_prefix_p (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
102SCM_SRFI1314_API SCM scm_string_prefix_ci_p (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
103SCM_SRFI1314_API SCM scm_string_suffix_p (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
104SCM_SRFI1314_API SCM scm_string_suffix_ci_p (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
105SCM_SRFI1314_API SCM scm_string_indexS (SCM s, SCM char_pred, SCM start, SCM end);
106SCM_SRFI1314_API SCM scm_string_index_right (SCM s, SCM char_pred, SCM start, SCM end);
107SCM_SRFI1314_API SCM scm_string_skip (SCM s, SCM char_pred, SCM start, SCM end);
108SCM_SRFI1314_API SCM scm_string_skip_right (SCM s, SCM char_pred, SCM start, SCM end);
109SCM_SRFI1314_API SCM scm_string_count (SCM s, SCM char_pred, SCM start, SCM end);
110SCM_SRFI1314_API SCM scm_string_contains (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
111SCM_SRFI1314_API SCM scm_string_contains_ci (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
112SCM_SRFI1314_API SCM scm_string_upcase_xS (SCM str, SCM start, SCM end);
113SCM_SRFI1314_API SCM scm_string_upcaseS (SCM str, SCM start, SCM end);
114SCM_SRFI1314_API SCM scm_string_downcase_xS (SCM str, SCM start, SCM end);
115SCM_SRFI1314_API SCM scm_string_downcaseS (SCM str, SCM start, SCM end);
116SCM_SRFI1314_API SCM scm_string_titlecase_x (SCM str, SCM start, SCM end);
117SCM_SRFI1314_API SCM scm_string_titlecase (SCM str, SCM start, SCM end);
118SCM_SRFI1314_API SCM scm_string_reverse (SCM str, SCM start, SCM end);
119SCM_SRFI1314_API SCM scm_string_reverse_x (SCM str, SCM start, SCM end);
120SCM_SRFI1314_API SCM scm_string_append_shared (SCM ls);
121SCM_SRFI1314_API SCM scm_string_concatenate (SCM ls);
122SCM_SRFI1314_API SCM scm_string_concatenate_shared (SCM ls);
123SCM_SRFI1314_API SCM scm_string_concatenate_reverse (SCM ls, SCM final_string, SCM end);
124SCM_SRFI1314_API SCM scm_string_concatenate_reverse_shared (SCM ls, SCM final_string, SCM end);
125SCM_SRFI1314_API SCM scm_string_map (SCM proc, SCM s, SCM start, SCM end);
126SCM_SRFI1314_API SCM scm_string_map_x (SCM proc, SCM s, SCM start, SCM end);
127SCM_SRFI1314_API SCM scm_string_fold (SCM kons, SCM knil, SCM s, SCM start, SCM end);
128SCM_SRFI1314_API SCM scm_string_fold_right (SCM kons, SCM knil, SCM s, SCM start, SCM end);
129SCM_SRFI1314_API SCM scm_string_unfold (SCM p, SCM f, SCM g, SCM seed, SCM base, SCM make_final);
130SCM_SRFI1314_API SCM scm_string_unfold_right (SCM p, SCM f, SCM g, SCM seed, SCM base, SCM make_final);
131SCM_SRFI1314_API SCM scm_string_for_each (SCM proc, SCM s, SCM start, SCM end);
132SCM_SRFI1314_API SCM scm_string_for_each_index (SCM proc, SCM s, SCM start, SCM end);
133SCM_SRFI1314_API SCM scm_xsubstring (SCM s, SCM from, SCM to, SCM start, SCM end);
134SCM_SRFI1314_API SCM scm_string_xcopy_x (SCM target, SCM tstart, SCM s, SCM sfrom, SCM sto, SCM start, SCM end);
135SCM_SRFI1314_API SCM scm_string_replace (SCM s1, SCM s2, SCM start1, SCM end1, SCM start2, SCM end2);
136SCM_SRFI1314_API SCM scm_string_tokenize (SCM s, SCM token_char, SCM start, SCM end);
137SCM_SRFI1314_API SCM scm_string_filter (SCM s, SCM char_pred, SCM start, SCM end);
138SCM_SRFI1314_API SCM scm_string_delete (SCM s, SCM char_pred, SCM start, SCM end);
653c7291 139
653c7291 140#endif /* SCM_SRFI_13_H */