Trim

From Mesham
Revision as of 10:24, 15 April 2013 by Polas (talk | contribs) (Created page with '== Overview == This trim(s) function will return a new string where the leading and trailing whitespace of string ''s'' has been removed. * '''Pass:''' A String * '''Return…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Overview

This trim(s) function will return a new string where the leading and trailing whitespace of string s has been removed.

Example

#include <string>
#include <io>

function void main() {
   var m:="    hello world    ";
   print(m+"-\n"+trim(m)+"-\n");
};

Since: Version 1.0