VBScript RTrimFunction


VBScript 参考手册Complete VBScript Reference Manual

The RTrim function removes spaces on the right side of a string.

Tip:Please refer to the LTrim and Trim functions.

Syntax

RTrim(string)

Parameters Description
string Required. A string expression.

Example

Example

<script type="text/vbscript">

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

</script>

The output of the above example:

Hello Jackand welcome.

Try it »

VBScript 参考手册Complete VBScript Reference Manual Other Extensions