Removes whitespace from the start and end of a String without changing the middle.
trim() trims whitespace characters such as spaces, carriage returns, tabs, Unicode "nbsp" character.
The parameter, str, is the string to trim. If a single string is passed, as in trim(' pad '), a single string is returned. If an array of strings is passed, as in trim([' pad ', '\n space \n']), an array of strings is returned.
Ejemplos
Sintaxis
trim(str)
trim(strs)
Parámetros
str
String:
string to trim.
strs
String[]:
strings to trim.
Returns
String: trimmed string.
This page is generated from the comments in src/utilities/string_functions.js . Please feel free to edit it and submit a pull request!