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
1
2
3
4
import System;
 
string foo = "    foo   ";
Console.log(foo.trim()); // "foo"

Share

HTML | BBCode | Direct Link