trimMulti

Summary

Removes whitespace from thje beginning and end of each line of the string.

Usage

public string trimMulti()

Returns

The string with whitespace removed from the beginning and end of each line.

Description

Trims leading and trailing whitespace from each line of the string without removing newline characters.

Examples

Basic Usage
1
2
3
4
import System;
 
string text = "The quick brown fox\n    jumped over the lazy dog."
Console.log(text.trimMulti()); // "The quick brown fox\njumped over the lazy dog."

Share

HTML | BBCode | Direct Link