indent: func [
"Prepend a leader to all lines in a string."
string [string!]
/by
amount [integer!]
/with
leader [string! char!]
/local
lines dent
] [
if not by [amount: 1]
if not with [leader: " "]
dent: mk-string amount leader
lines: parse/all string form newline
foreach line lines [insert line dent]
build-dlm-str lines newline
]
You need to create an account or log in to post comments to this site.