\f
/*
-xSCM_DEFINE (scm_i_index, "i-index", 2, 2, 0,
+xSCM_DEFINE (scm_i_index, "i-index", 2, 2, 0,
(SCM str, SCM chr, SCM frm, SCM to),
"@deftypefn {Internal C Function} {static int} scm_i_index (SCM *@var{str}, \n"
"SCM @var{chr}, int @var{direction}, SCM @var{sub_start}, SCM @var{sub_end}, char *@var{why})
*/
/* implements index if direction > 0 otherwise rindex. */
static int
-scm_i_index (SCM *str, SCM chr, int direction, SCM sub_start,
+scm_i_index (SCM *str, SCM chr, int direction, SCM sub_start,
SCM sub_end, const char *why)
{
unsigned char * p;
return -1;
}
-SCM_DEFINE (scm_string_index, "string-index", 2, 2, 0,
+SCM_DEFINE (scm_string_index, "string-index", 2, 2, 0,
(SCM str, SCM chr, SCM frm, SCM to),
"Return the index of the first occurrence of @var{chr} in\n"
"@var{str}. The optional integer arguments @var{frm} and\n"
#define FUNC_NAME s_scm_string_index
{
int pos;
-
+
if (SCM_UNBNDP (frm))
frm = SCM_BOOL_F;
if (SCM_UNBNDP (to))
}
#undef FUNC_NAME
-SCM_DEFINE (scm_string_rindex, "string-rindex", 2, 2, 0,
+SCM_DEFINE (scm_string_rindex, "string-rindex", 2, 2, 0,
(SCM str, SCM chr, SCM frm, SCM to),
"Like @code{string-index}, but search from the right of the\n"
"string rather than from the left. This procedure essentially\n"
#define FUNC_NAME s_scm_string_rindex
{
int pos;
-
+
if (SCM_UNBNDP (frm))
frm = SCM_BOOL_F;
if (SCM_UNBNDP (to))
y
@result{} "abccdeg"
@end lisp
-*/
+*/
-SCM_DEFINE (scm_substring_move_x, "substring-move!", 5, 0, 0,
+SCM_DEFINE (scm_substring_move_x, "substring-move!", 5, 0, 0,
(SCM str1, SCM start1, SCM end1, SCM str2, SCM start2),
"@deffnx primitive substring-move-left! str1 start1 end1 str2 start2\n"
"@deffnx primitive substring-move-right! str1 start1 end1 str2 start2\n"
"Copy the substring of @var{str1} bounded by @var{start1} and @var{end1}\n"
- "into @var{str2} beginning at position @var{end2}.\n"
+ "into @var{str2} beginning at position @var{start2}.\n"
"@code{substring-move-right!} begins copying from the rightmost character\n"
"and moves left, and @code{substring-move-left!} copies from the leftmost\n"
"character moving right.\n\n"
SCM_SYSCALL(memmove((void *)(&(SCM_STRING_CHARS(str2)[s2])),
(void *)(&(SCM_STRING_CHARS(str1)[s1])),
len));
-
+
return scm_return_first(SCM_UNSPECIFIED, str1, str2);
}
#undef FUNC_NAME
-SCM_DEFINE (scm_substring_fill_x, "substring-fill!", 4, 0, 0,
+SCM_DEFINE (scm_substring_fill_x, "substring-fill!", 4, 0, 0,
(SCM str, SCM start, SCM end, SCM fill),
"Change every character in @var{str} between @var{start} and\n"
"@var{end} to @var{fill}.\n"
#undef FUNC_NAME
-SCM_DEFINE (scm_string_null_p, "string-null?", 1, 0, 0,
+SCM_DEFINE (scm_string_null_p, "string-null?", 1, 0, 0,
(SCM str),
"Return @code{#t} if @var{str}'s length is nonzero, and\n"
"@code{#f} otherwise.\n"
#undef FUNC_NAME
-SCM_DEFINE (scm_string_to_list, "string->list", 1, 0, 0,
+SCM_DEFINE (scm_string_to_list, "string->list", 1, 0, 0,
(SCM str),
"Return a newly allocated list of the characters that make up\n"
"the given string @var{str}. @code{string->list} and\n"
}
-SCM_DEFINE (scm_string_copy, "string-copy", 1, 0, 0,
+SCM_DEFINE (scm_string_copy, "string-copy", 1, 0, 0,
(SCM str),
"Return a newly allocated copy of the given @var{string}.")
#define FUNC_NAME s_scm_string_copy
#undef FUNC_NAME
-/* Helper function for the string uppercase conversion functions.
+/* Helper function for the string uppercase conversion functions.
* No argument checking is performed. */
static SCM
string_upcase_x (SCM v)
}
-SCM_DEFINE (scm_string_upcase_x, "string-upcase!", 1, 0, 0,
+SCM_DEFINE (scm_string_upcase_x, "string-upcase!", 1, 0, 0,
(SCM str),
"Destructively upcase every character in @var{str} and return\n"
"@var{str}.\n"
#undef FUNC_NAME
-SCM_DEFINE (scm_string_upcase, "string-upcase", 1, 0, 0,
+SCM_DEFINE (scm_string_upcase, "string-upcase", 1, 0, 0,
(SCM str),
"Return a freshly allocated string containing the characters of\n"
"@var{str} in upper case.")
#undef FUNC_NAME
-/* Helper function for the string lowercase conversion functions.
+/* Helper function for the string lowercase conversion functions.
* No argument checking is performed. */
static SCM
string_downcase_x (SCM v)
}
-SCM_DEFINE (scm_string_downcase_x, "string-downcase!", 1, 0, 0,
+SCM_DEFINE (scm_string_downcase_x, "string-downcase!", 1, 0, 0,
(SCM str),
"Destructively downcase every character in @var{str} and return\n"
"@var{str}.\n"
#undef FUNC_NAME
-SCM_DEFINE (scm_string_downcase, "string-downcase", 1, 0, 0,
+SCM_DEFINE (scm_string_downcase, "string-downcase", 1, 0, 0,
(SCM str),
"Return a freshly allocation string containing the characters in\n"
"@var{str} in lower case.")
#undef FUNC_NAME
-/* Helper function for the string capitalization functions.
+/* Helper function for the string capitalization functions.
* No argument checking is performed. */
static SCM
string_capitalize_x (SCM str)
}
-SCM_DEFINE (scm_string_capitalize_x, "string-capitalize!", 1, 0, 0,
+SCM_DEFINE (scm_string_capitalize_x, "string-capitalize!", 1, 0, 0,
(SCM str),
"Upcase the first character of every word in @var{str}\n"
"destructively and return @var{str}.\n"
#undef FUNC_NAME
-SCM_DEFINE (scm_string_capitalize, "string-capitalize", 1, 0, 0,
+SCM_DEFINE (scm_string_capitalize, "string-capitalize", 1, 0, 0,
(SCM str),
"Return a freshly allocated string with the characters in\n"
"@var{str}, where the first character of every word is\n"
#undef FUNC_NAME
-SCM_DEFINE (scm_string_split, "string-split", 2, 0, 0,
+SCM_DEFINE (scm_string_split, "string-split", 2, 0, 0,
(SCM str, SCM chr),
"Split the string @var{str} into the a list of the substrings delimited\n"
"by appearances of the character @var{chr}. Note that an empty substring\n"
#undef FUNC_NAME
-SCM_DEFINE (scm_string_ci_to_symbol, "string-ci->symbol", 1, 0, 0,
+SCM_DEFINE (scm_string_ci_to_symbol, "string-ci->symbol", 1, 0, 0,
(SCM str),
"Return the symbol whose name is @var{str}. @var{str} is\n"
"converted to lowercase before the conversion is done, if Guile\n"