Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

VBScript Right function


May 13, 2021 VBScript


Table of contents


VBScript Right function

The VBScript Right function returns a specified number of characters to the far right of the string.


VBScript Right function Complete VBScript reference manual

The Right function returns a specified number of characters from the right side of the string.

Tip: Use the Len function to determine the number of characters in the string.

Tip: See Left function.

Grammar

Right(string,length)

parameter describe
string Required.From the string of the character's character.
length Required.How many characters need to return to the regulations.If set to 0, return an empty string ("").Returns the entire string if set to a length greater than or equal to the string.

Instance 1

<script type="text/vbscript">

txt="This is a beautiful day!"
document.write(Right(txt,10))

</script>

The above example output results:

tiful day!

Try it out . . .

Instance 2

Returns the entire string:

<script type="text/vbscript">

txt="This is a beautiful day!"
x=Len(txt)
document.write(Right(txt,x))

</script>

The above example output results:

This is a beautiful day!

Try it out . . .

VBScript Right function Complete VBScript reference manual