3 /* srfi-13.c --- SRFI-13 procedures for Guile
5 * Copyright (C) 2001 Free Software Foundation, Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 /* SCM_SRFI1314_API is a macro prepended to all function and data definitions
24 which should be exported or imported in the resulting dynamic link
25 library in the Win32 port. */
27 #if defined (SCM_SRFI1314_IMPORT)
28 # define SCM_SRFI1314_API __declspec (dllimport) extern
29 #elif defined (SCM_SRFI1314_EXPORT) || defined (DLL_EXPORT)
30 # define SCM_SRFI1314_API __declspec (dllexport) extern
32 # define SCM_SRFI1314_API extern
35 SCM_SRFI1314_API
void scm_init_srfi_13 (void);
36 SCM_SRFI1314_API
void scm_init_srfi_13_14 (void);
38 SCM_SRFI1314_API SCM
scm_string_any (SCM pred
, SCM s
, SCM start
, SCM end
);
39 SCM_SRFI1314_API SCM
scm_string_every (SCM pred
, SCM s
, SCM start
, SCM end
);
40 SCM_SRFI1314_API SCM
scm_string_tabulate (SCM proc
, SCM len
);
41 SCM_SRFI1314_API SCM
scm_string_to_listS (SCM str
, SCM start
, SCM end
);
42 SCM_SRFI1314_API SCM
scm_reverse_list_to_string (SCM chrs
);
43 SCM_SRFI1314_API SCM
scm_string_join (SCM ls
, SCM delimiter
, SCM grammar
);
44 SCM_SRFI1314_API SCM
scm_string_copyS (SCM str
, SCM start
, SCM end
);
45 SCM_SRFI1314_API SCM
scm_substring_shared (SCM str
, SCM start
, SCM end
);
46 SCM_SRFI1314_API SCM
scm_string_copy_x (SCM target
, SCM tstart
, SCM s
, SCM start
, SCM end
);
47 SCM_SRFI1314_API SCM
scm_string_take (SCM s
, SCM n
);
48 SCM_SRFI1314_API SCM
scm_string_drop (SCM s
, SCM n
);
49 SCM_SRFI1314_API SCM
scm_string_take_right (SCM s
, SCM n
);
50 SCM_SRFI1314_API SCM
scm_string_drop_right (SCM s
, SCM n
);
51 SCM_SRFI1314_API SCM
scm_string_pad (SCM s
, SCM len
, SCM chr
, SCM start
, SCM end
);
52 SCM_SRFI1314_API SCM
scm_string_pad_right (SCM s
, SCM len
, SCM chr
, SCM start
, SCM end
);
53 SCM_SRFI1314_API SCM
scm_string_trim (SCM s
, SCM char_pred
, SCM start
, SCM end
);
54 SCM_SRFI1314_API SCM
scm_string_trim_right (SCM s
, SCM char_pred
, SCM start
, SCM end
);
55 SCM_SRFI1314_API SCM
scm_string_trim_both (SCM s
, SCM char_pred
, SCM start
, SCM end
);
56 SCM_SRFI1314_API SCM
scm_string_fill_xS (SCM str
, SCM chr
, SCM start
, SCM end
);
57 SCM_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
);
58 SCM_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
);
59 SCM_SRFI1314_API SCM
scm_string_eq (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
60 SCM_SRFI1314_API SCM
scm_string_neq (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
61 SCM_SRFI1314_API SCM
scm_string_lt (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
62 SCM_SRFI1314_API SCM
scm_string_gt (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
63 SCM_SRFI1314_API SCM
scm_string_le (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
64 SCM_SRFI1314_API SCM
scm_string_ge (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
65 SCM_SRFI1314_API SCM
scm_string_ci_eq (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
66 SCM_SRFI1314_API SCM
scm_string_ci_neq (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
67 SCM_SRFI1314_API SCM
scm_string_ci_lt (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
68 SCM_SRFI1314_API SCM
scm_string_ci_gt (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
69 SCM_SRFI1314_API SCM
scm_string_ci_le (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
70 SCM_SRFI1314_API SCM
scm_string_ci_ge (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
71 SCM_SRFI1314_API SCM
scm_string_prefix_length (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
72 SCM_SRFI1314_API SCM
scm_string_prefix_length_ci (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
73 SCM_SRFI1314_API SCM
scm_string_suffix_length (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
74 SCM_SRFI1314_API SCM
scm_string_suffix_length_ci (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
75 SCM_SRFI1314_API SCM
scm_string_prefix_p (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
76 SCM_SRFI1314_API SCM
scm_string_prefix_ci_p (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
77 SCM_SRFI1314_API SCM
scm_string_suffix_p (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
78 SCM_SRFI1314_API SCM
scm_string_suffix_ci_p (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
79 SCM_SRFI1314_API SCM
scm_string_indexS (SCM s
, SCM char_pred
, SCM start
, SCM end
);
80 SCM_SRFI1314_API SCM
scm_string_index_right (SCM s
, SCM char_pred
, SCM start
, SCM end
);
81 SCM_SRFI1314_API SCM
scm_string_skip (SCM s
, SCM char_pred
, SCM start
, SCM end
);
82 SCM_SRFI1314_API SCM
scm_string_skip_right (SCM s
, SCM char_pred
, SCM start
, SCM end
);
83 SCM_SRFI1314_API SCM
scm_string_count (SCM s
, SCM char_pred
, SCM start
, SCM end
);
84 SCM_SRFI1314_API SCM
scm_string_contains (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
85 SCM_SRFI1314_API SCM
scm_string_contains_ci (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
86 SCM_SRFI1314_API SCM
scm_string_upcase_xS (SCM str
, SCM start
, SCM end
);
87 SCM_SRFI1314_API SCM
scm_string_upcaseS (SCM str
, SCM start
, SCM end
);
88 SCM_SRFI1314_API SCM
scm_string_downcase_xS (SCM str
, SCM start
, SCM end
);
89 SCM_SRFI1314_API SCM
scm_string_downcaseS (SCM str
, SCM start
, SCM end
);
90 SCM_SRFI1314_API SCM
scm_string_titlecase_x (SCM str
, SCM start
, SCM end
);
91 SCM_SRFI1314_API SCM
scm_string_titlecase (SCM str
, SCM start
, SCM end
);
92 SCM_SRFI1314_API SCM
scm_string_reverse (SCM str
, SCM start
, SCM end
);
93 SCM_SRFI1314_API SCM
scm_string_reverse_x (SCM str
, SCM start
, SCM end
);
94 SCM_SRFI1314_API SCM
scm_string_append_shared (SCM ls
);
95 SCM_SRFI1314_API SCM
scm_string_concatenate (SCM ls
);
96 SCM_SRFI1314_API SCM
scm_string_concatenate_shared (SCM ls
);
97 SCM_SRFI1314_API SCM
scm_string_concatenate_reverse (SCM ls
, SCM final_string
, SCM end
);
98 SCM_SRFI1314_API SCM
scm_string_concatenate_reverse_shared (SCM ls
, SCM final_string
, SCM end
);
99 SCM_SRFI1314_API SCM
scm_string_map (SCM proc
, SCM s
, SCM start
, SCM end
);
100 SCM_SRFI1314_API SCM
scm_string_map_x (SCM proc
, SCM s
, SCM start
, SCM end
);
101 SCM_SRFI1314_API SCM
scm_string_fold (SCM kons
, SCM knil
, SCM s
, SCM start
, SCM end
);
102 SCM_SRFI1314_API SCM
scm_string_fold_right (SCM kons
, SCM knil
, SCM s
, SCM start
, SCM end
);
103 SCM_SRFI1314_API SCM
scm_string_unfold (SCM p
, SCM f
, SCM g
, SCM seed
, SCM base
, SCM make_final
);
104 SCM_SRFI1314_API SCM
scm_string_unfold_right (SCM p
, SCM f
, SCM g
, SCM seed
, SCM base
, SCM make_final
);
105 SCM_SRFI1314_API SCM
scm_string_for_each (SCM proc
, SCM s
, SCM start
, SCM end
);
106 SCM_SRFI1314_API SCM
scm_string_for_each_index (SCM proc
, SCM s
, SCM start
, SCM end
);
107 SCM_SRFI1314_API SCM
scm_xsubstring (SCM s
, SCM from
, SCM to
, SCM start
, SCM end
);
108 SCM_SRFI1314_API SCM
scm_string_xcopy_x (SCM target
, SCM tstart
, SCM s
, SCM sfrom
, SCM sto
, SCM start
, SCM end
);
109 SCM_SRFI1314_API SCM
scm_string_replace (SCM s1
, SCM s2
, SCM start1
, SCM end1
, SCM start2
, SCM end2
);
110 SCM_SRFI1314_API SCM
scm_string_tokenize (SCM s
, SCM token_char
, SCM start
, SCM end
);
111 SCM_SRFI1314_API SCM
scm_string_filter (SCM s
, SCM char_pred
, SCM start
, SCM end
);
112 SCM_SRFI1314_API SCM
scm_string_delete (SCM s
, SCM char_pred
, SCM start
, SCM end
);
114 #endif /* SCM_SRFI_13_H */