Trim

From Mesham
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