README.md
December 4, 2022 ยท View on GitHub
Description
These functions have the same functionality as the homonymous ones in VBScript, they remove leading and/or trailing spaces from a given string
More Info
Any String
The string inputed less leading and/or trailing spaces
| Submitted On | |
| By | Walter Staeblein |
| Level | Beginner |
| User Rating | 4.3 (17 globes from 4 users) |
| Compatibility | |
| Category | String Manipulation |
| World | Java |
| Archive File |
Source Code
<script language="javascript">
function jsTrim(TXT)
{
return TXT.replace(/(^\s+)|(\s+$)/g,"");
}
function jsLTrim(TXT)
{
return TXT.replace(/(^\s+)/g,"");
}
function jsRTrim(TXT)
{
return TXT.replace(/(\s+$)/g,"");
}
</script>