ADO DOT NET Posted February 28, 2008 Posted February 28, 2008 Hi, How can I check how many "/" is in a string, JUST with .net functions? Is there a straight way without looping? Thanks. Quote
Administrators PlausiblyDamp Posted February 28, 2008 Administrators Posted February 28, 2008 Without getting involved with regular expressions a simple loop is probably easiest; unless the string is very large performance is unlikely to suffer either. Out of interest what are you trying to do? There may be an alternate method that saves you the trouble... Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
techmanbd Posted February 28, 2008 Posted February 28, 2008 Hi, How can I check how many "/" is in a string, JUST with .net functions? Is there a straight way without looping? Thanks. Dim stS as string Dim intI As Integer = (st.Split("/").Length -1) Quote Live as if you were to die tomorrow. Learn as if you were to live forever. Gandhi
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.