-
Notifications
You must be signed in to change notification settings - Fork 0
Mint.utils.trimString
Tania Shatilova edited this page Nov 10, 2015
·
1 revision
The trimString() method removes spaces from the beginning and the ending of the string but not from the middle of the string.
var trimmedStr = Mint.utils.trimString(" Lorem impus ");- value - string for trim.
The string that remains after all spaces are removed from the start and end of the inner string.
Mint.utils.trimString(" Lorem impus "); // "Lorem impus"
Mint.utils.trimString("Lorem impus"); // "Lorem impus"
Mint.utils.trimString(" Lorem ipsum dolor sit amet"); // "Lorem ipsum dolor sit amet"
Mint.utils.trimString(" "); // ""
Mint.utils.trimString(""); // ""
Mint.utils.trimString(null); // error
Mint.utils.trimString(12); // error