Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
What to use in VBScript to count
Name: antgaudi Date: March 18, 2009 at 23:39:19 Pacific OS: Windows XP CPU/Ram: 1.5 GHz / 495 MB Subcategory: General
Comment:
What should I use in VBScript to count the # of times a letter appears in a string? I've tried:
dim txt txt="This is a beautiful day!" document.write(Mid(txt,"i")) document.write(Len(txt))
Name: Radix-64 Date: March 20, 2009 at 15:42:48 Pacific
Reply:
Hi, have you tried using the split and ubound functions? Maybe something like:
<% Dim textstring, wipstring, numberoftimes textString ="The brown fox jumped quickly over a fence" wipstring = Split(textstring, "a") numberoftimes = UBound(wipstring) Response.write "The count is " & numberoftimes & " ." %>
0
Response Number 2
Name: antgaudi Date: March 20, 2009 at 23:02:27 Pacific
Summary: Thanks for responding, although I'm not sure that helps me. What I was trying to establish is what is the best connected country to the main bulk of Africa? From ping testing I have come to the conclu...
Summary: What cms are you using? Also most cms will have a feature where you can click to make a new link and it will ask you what page you want it to go to in your site. Collingwood Web Design...
Summary: Hi Michael and thanks for your reply. Thanks for your pointer about downloading the file back to my HD from the server to see if the code looks okay. I will try that next time it happens. What was yo...