String Utilities

Various string functions

Procedures

string:limit-length str n

Limits the length of a string by adding ellipsis (...) if necessary.

string:resize str n

"Resizes" a string by either padding right or adding ellipsis so that the string's length equals a specified amount. Returns a cons pair with car = the resized string, and cdr = the part that was truncated (#f if none)

(string:resize "Mathematical judgments are always synthetical" 30)
;Value 22757: ("Mathematical judgments are ..." . "always synthetical")

(string:resize "Mathematical judgments are always synthetical" 50)
;Value 22758: ("Mathematical judgments are always synthetical     " . #f)

string:unquote str

Removes quotes from around a string (if any).


Scheme Power Tools Documentation
(c) Maciej Pacula 2010-2011
http://mpacula.com