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 ");
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
There was an error while loading. Please reload this page.
Home
Setup & Dependencies
Browsers support
Tests
Mint.utils functions
LICENSE