SRFI 185: Linear adjustable-length strings

by John Cowan

status: final (2020-04-26)

keywords: Data Structure

See also SRFI 13: String Libraries, SRFI 118: Simple adjustable-size strings, SRFI 130: Cursor-based string library, SRFI 140: Immutable Strings, and SRFI 152: String Library (reduced).


Scheme specifies mutable fixed-length strings. SRFI 118 adds two procedures, string-append! and string-replace!, which allow the length of the string to change. This SRFI provides two linear-update versions of these procedures: that is, the implementation may change the string length or return a new string instead. In addition, two convenience macros are provided that make the procedures somewhat easier to use.