VBScript LTrimFunction


VBScript 参考手册Complete VBScript Reference

The LTrim function removes spaces on the left side of a string.

Tip:Please refer to the RTrim and Trim functions.

Syntax

LTrim(string)

Arguments Description
string Required. A string expression.

Example

Example

<script type="text/vbscript">

fname=" Jack "
document.write("Hello" & LTrim(fname) & "and welcome.")

</script>

The output result of the above example is:

HelloJack and welcome.

Try it Yourself »

VBScript 参考手册Complete VBScript Reference Other Extensions