Codefixer - ASP tutorials, resources and software
asp.netPRO “Best ASP.NET Host” – DiscountASP.NET
Home   Articles   Resources   ASP directory   ASP Tutorials   Code Snippets   ASP Applications   Forum
Saturday 17 May
MembersPro PayPal - ASP Membership software

asp.netPRO “Best ASP.NET Host” – DiscountASP.NET


ASP Partner ASP Partner ASP Partner more partners...

Len VBScript function

Syntax: Len(String)
The function will simply return the length of the string.

Example 1:

<%
String1="michael"
Response.write Len(String1)
%>

Result displayed on the screen would be:
7

* 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:
mic



Other useful VBScript functions for Parsing String

LinksPro - Directory  and Link  Management Software




ASP.NET 3.5/2.0 Web Hosting: 3 Months FREE – Click Here!




About | Contact | Advertise | Feedback | Hire Us | Link

Site developed by Michael Wall - Web Design Belfast N.Ireland.
Copyright © 2000-2008. All rights reserved.

Do you intend to move to ASP.NET or have you already?
Yes will do
Have done
ASP does fine
Not a priority


Directory Software