Right Function
Tips >>ASP Functions

WANTS TO MAKE SOFTWARE WITHOUT KNOWLEDGE OF ASP? CLICK HERE


The Right function returns a specified number of characters from the right side of a string. The Right function returns the right portion of the designated string for a designated length starting from the right side.

Tip :- Use the Len function to find the number of characters in a string.
Tip :- Also look at the Left function.

There are Two Mandatory Arguments :-

  • String :- The String argument is the name of the string you wish to truncate.

  • Length :- The Length argument is the number of characters (including blanks) you wish to save counting from the right side towards the left side of the string.

The Syntax of the Right Function is :-

Right(string,length)

Example#1 :-

Code :-
dim txt
txt="This is a beautiful day!"
document.write(Right(txt,11))
Output :-
utiful day!

Example#2 :-

Code :-
dim txt
txt="This is a beautiful day!"
document.write(Right(txt,100))
Output :-
This is a beautiful day!

Example#3 :-

Code :-
dim txt,x
txt="This is a beautiful day!"
x=Len(txt)
document.write(Right(txt,x))
Output :-

This is a beautiful day!

Example#4 :-

Code :-
<%
=Right("abcde fghij klmno pqrst uvwxyz", 13)
%>
Output :-

pqrst uvwxyz

Note :- The RightB function is used with byte data contained in a string. Instead of specifying the number of characters to return, length specifies the number of bytes.

 
E-mail : sales@virtualsplat.com
Phone : +91-9892413501

Whatsapp Icon +91-9967648641

Whatsapp Icon +91-9967648641