![]() |
|
|
Len VBScript functionSyntax: Len(String) Example 1: <%
String1="michael" Response.write Len(String1) %> Result displayed on the screen would be: * Remember that for the length function the first character has a starting index of 1. Example 2: <% String1="michael" Response.write Left(String1,Len(String1)-4) 'the above code i.e. Len(String1) returns the length of the string michael i.e. 7 'Next it takes 4 way leaving us with 3 characters 'We then use the Left function to return the first 3 characters from the left %>
Result displayed on the screen would be: Other useful VBScript functions for Parsing String
Site developed by Michael Wall - Web Design Belfast N.Ireland. |
|