VBScript trim function



VBScript Trim

VBScript trim function removes both the Leading and Trailing blank spaces of the given input string.

Syntax :

Trim(String)

Example :

<!DOCTYPE html>
<html>
<body>
<script language="vbscript" type="text/vbscript">

var =       "            c4learn.com           "
document.write("After Trimming Operation : " & Trim(var))

</script>
</body>
</html>

Output :

After running above script in IE we will get following output –

After Trimming Operation : c4learn.com