# (retropikzel string-util) (**any->string** *val*) Takes in any kind of *val* and returns it as string as outputted by display procedure. (**string-replace** *str* *replace* *replace-with*) (**string-replace** *str* (*replace* *replace-with*) ...) Replaces the *replace* string with *replace-with* string on on all occurances inside string *str*. Or replaces all given (*replace* *replace-with*) pairs. Examples: (string-replace "foo123bar" "123" "456") > "foo456bar" (string-replace "foo123bar-no" '("123" "456") '("no" "yes")) > "foo456bar-yes" (**string-split** *str* [*char*]) Split string *str* at character *char*. If *char* is not given **#\space** is used. (**string-format** *str* *vals*) *str* should be string containing keys of values surrounded by curly brackets. *vals* should be list of lists containing key and value. Examples: (string-format "Hello {name}, I count {n} parenthesis" '((name "Schemer") (n 7))) > "Hello Schemer, I count 7 parenthesis" (**string-capitalize** *str*) Capitalizes the first character of given string *str*. Examples: (string-capitalize "hello") > "Hello" (**string-center** *str* *len* . *char*) Center aligns the given string *str* to given *len*. If character *char* is given it is used, otherwise space is used. Examples: (string-center "hello" 15) > " hello " (**string-ends-with?** *str* *end-str*) Returns #t if given str ends with end-str. #f otherwise. Examples: (string-ends-with? "hello" \#o) > #t (string-ends-with? "hello" \#e) > #f (**string-expand-tabs** *str* *size*) Expand any **#\tab** in string *str* with spaces of count *size*. Examples: (string-expand-tabs "\thello" 2) > " hello" (string-expand-tabs "\thello\t" 4) > " hello "