Trim

From Mesham
Revision as of 15:45, 15 April 2019 by Polas (talk | contribs) (1 revision imported)
(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