Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This function trims all leading and trailing spaces from a string.

Parameters:

  • string – the string from which all leading and trailing spaces will be removed.

Example:

Code Block
javascript
javascript

var myName = trim(" Michael ");   // places "Michael" into myName

...