Difference between revisions of "Trim"

From Mesham
Jump to navigationJump to search
(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…')
(No difference)

Revision as of 10:24, 15 April 2013

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