Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Set of funcitons that trims a string in Javascipt :)
- **/
- function trim(stringToTrim) {
- return stringToTrim.replace(/^\s+|\s+$/g,"");
- }
- function ltrim(stringToTrim) {
- return stringToTrim.replace(/^\s+/,"");
- }
- function rtrim(stringToTrim) {
- return stringToTrim.replace(/\s+$/,"");
- }
Add Comment
Please, Sign In to add comment