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

added OpenEdge solution
(Added Nemerle)
(added OpenEdge solution)
Line 334:
# rtrim s ;;
- : string = " \t \r \n String with spaces"</pre>
 
=={{header|OpenEdge/Progress}}==
<lang progress>DEF VAR cc AS CHAR INIT " string with spaces ".
 
MESSAGE
"|" + LEFT-TRIM( cc ) + "|" SKIP
"|" + RIGHT-TRIM( cc ) + "|" SKIP
"|" + TRIM( cc ) + "|"
VIEW-AS ALERT-BOX.</lang>
Output:
<pre>
---------------------------
Message
---------------------------
|string with spaces |
| string with spaces|
|string with spaces|
---------------------------
OK
---------------------------
</pre>
 
=={{header|Perl}}==
73

edits