Strip whitespace from a string/Top and tail: Difference between revisions
Strip whitespace from a string/Top and tail (view source)
Revision as of 23:43, 28 February 2021
, 3 years agoadd Standard ML
Drkameleon (talk | contribs) (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}}==
|