Strings.trim()

Trim trailing and leading whitespace from a string.

Usage

Hover over inputs/exits for more info.

var Strings = require('machinepack-strings');


// Trim trailing and leading whitespace from a string.

Strings.trim({

string: ' I went to the store to get some more milk. ',

}).execSync();

Inputs

string required

The string to trim.

'   I went to the store to get some more milk.     '

Exits

error

An unexpected error occurred.

success

OK.

'I went to the store to get some more milk.'