VBScript Multiple choices


Total available count: 25
Subject - Scripting Languages
Subsubject - VBScript

What is the use of the Left() function in VBScript?


 

 

 

 



D


Solution:-

VBScript Left Function
Returns a specified number of characters from the left side of a string by the Left function.

Tip: To find the number of characters in a string using the Len function.

VBScript Left Function Syntax is as below:

Left(string,length)

string    Required. The string to return characters from
length    Required. Specifies how many characters to return. If set to 0, an empty string ("") is returned. If set to greater than or equal to the length of the 
                string, the entire string is returned

VBScript Left Function Examples is as follows:

Example-1

<%

txt="This is a beautiful day!"
response.write(Left(txt,15))

%>

The output of the above code will be as below:

This is a beaut

Example-2

Return the whole string:

<%

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

%>

The output of the above code will be as below:

This is a beautiful day!




Next 5 multiple choice(s)

1

What is the use of the InStr() function in VBScript?

2

What is the use of the Chr() function in VBScript?

3

What is the use of the Asc() function in VBScript?

4

What is the use of the Len() function in VBScript?

5

What is the use of Mid() function in VBScript?

Comments