trim Summary Removes whitespace from the beginning and end of the string. Usage public string trim() Returns The string with whitespace from the beginning and end removed. Description Removes whitespace from the beginning and end of the string. Examples Basic Usage 1234import System; string foo = " foo ";Console.log(foo.trim()); // "foo" Share HTML | BBCode | Direct Link