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

add Standard ML
(added Arturo)
(add Standard ML)
Line 2,473:
Trailing: >� Hello, people of earth!<
Full trim: >Hello, people of earth!<</pre>
 
=={{header|Standard ML}}==
<lang sml>local
open Substring
in
val trimLeft = string o dropl Char.isSpace o full
and trimRight = string o dropr Char.isSpace o full
and trim = string o dropl Char.isSpace o dropr Char.isSpace o full
end</lang>
 
=={{header|Stata}}==
559

edits