Strip whitespace from a string/Top and tail: Difference between revisions

Content deleted Content added
Stefan (talk | contribs)
added OpenEdge solution
Forth
Line 104: Line 104:
Writeln('"' + Trim(TEST_STRING) + '"');
Writeln('"' + Trim(TEST_STRING) + '"');
end.</lang>
end.</lang>

=={{header|Forth}}==
<lang forth>: -leading ( addr len -- addr' len' )
begin over c@ bl = while 1 /string repeat ;
\ -trailing is built in

s" test "
2dup -leading cr type
2dup -trailing cr type
-leading -trailing cr type</lang>


=={{header|Go}}==
=={{header|Go}}==