Strip whitespace from a string/Top and tail: Difference between revisions
Strip whitespace from a string/Top and tail (view source)
Revision as of 16:28, 10 February 2024
, 3 months ago→{{header|Wren}}: Changed to Wren S/H
m (→{{header|C}}) |
m (→{{header|Wren}}: Changed to Wren S/H) |
||
(One intermediate revision by one other user not shown) | |||
Line 654:
}</syntaxhighlight>
==={{header|
<p>Gadget C-library:
Line 3,207:
=={{header|Wren}}==
In Wren 'whitespace' is defined as: space, tab, carriage return, and line feed characters. To trim off other non-printing characters such as form feed and vertical tab, you need to do a little more work.
<syntaxhighlight lang="
var b = "String with trailing whitespace removed \t\r\n"
var c = " \t\r\nString with both leading and trailing whitespace removed \t\r\n"
|