Next: , Previous: Alphabetic Case Mapping, Up: Strings


5.5.5.10 Reversing and Appending Strings
— Scheme Procedure: string-reverse str [start [end]]
— C Function: scm_string_reverse (str, start, end)

Reverse the string str. The optional arguments start and end delimit the region of str to operate on.

— Scheme Procedure: string-reverse! str [start [end]]
— C Function: scm_string_reverse_x (str, start, end)

Reverse the string str in-place. The optional arguments start and end delimit the region of str to operate on. The return value is unspecified.

— Scheme Procedure: string-append . args
— C Function: scm_string_append (args)

Return a newly allocated string whose characters form the concatenation of the given strings, args.

          (let ((h "hello "))
            (string-append h "world"))
          => "hello world"
     
— Scheme Procedure: string-append/shared . ls
— C Function: scm_string_append_shared (ls)

Like string-append, but the result may share memory with the argument strings.

— Scheme Procedure: string-concatenate ls
— C Function: scm_string_concatenate (ls)

Append the elements of ls (which must be strings) together into a single string. Guaranteed to return a freshly allocated string.

— Scheme Procedure: string-concatenate-reverse ls [final_string [end]]
— C Function: scm_string_concatenate_reverse (ls, final_string, end)

Without optional arguments, this procedure is equivalent to

          (string-concatenate (reverse ls))
     

If the optional argument final_string is specified, it is consed onto the beginning to ls before performing the list-reverse and string-concatenate operations. If end is given, only the characters of final_string up to index end are used.

Guaranteed to return a freshly allocated string.

— Scheme Procedure: string-concatenate/shared ls
— C Function: scm_string_concatenate_shared (ls)

Like string-concatenate, but the result may share memory with the strings in the list ls.

— Scheme Procedure: string-concatenate-reverse/shared ls [final_string [end]]
— C Function: scm_string_concatenate_reverse_shared (ls, final_string, end)

Like string-concatenate-reverse, but the result may share memory with the the strings in the ls arguments.