faqts : Computers : Programming : Languages : Asp : ASP/VBScript : Common Problems

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

18 of 20 people (90%) answered Yes
Recently 9 of 10 people (90%) answered Yes

Entry

Is there a vbscript function (or some other way) to get the count of an item in a string?

Jul 17th, 2000 05:32
unknown unknown, Mark Postier


You could use the Split Function and split on commas and then get upper
bound of the array
InputValue = Request("TextBox")
Dim strArray
strArray = Split(InputValue, ",")
TotalCommas = Ubound(strArray)
Response.write("Total Commas are " & TotalCommas)



© 1999-2004 Synop Pty Ltd