1
0
tigersay/test_tig_1.tig

17 lines
522 B
Plaintext
Raw Normal View History

2017-11-14 12:07:25 +00:00
/* output: 1 */
let
function indentstring (text : string, indent : string) : string =
let var out := indent
var newline_and_indent := concat("\n", indent)
var char := ""
in for i := 0 to size(text) - 1 do
( char := substring (text, i, 1)
; out := concat(out, if char <> "\n"
then char
else newline_and_indent));
out
end
in
indentstring("Hello\nWorld", " ") = " Hello\n World"
end