Recommended Answers
Jump to PostI agree with that! It's a nice simple solution and would be tolerable if the string is short, like you have originally said.
I've only just really begun GUI coding, I mainly focus on code that is written. I enjoy using OOP and all it's advantages (inheritance etc) I …
Jump to PostHere's how I do this (and we all have to do this alot)
strText = "My Text To Count Words" ' (LTRIMmed and RTRIMmed) dim aryWords() as string = strText.split(" ") dim WordCount = aryWords.length + 1 ' Arrays are zero based.
What we just did was …
Jump to PostThat looks good, but you might have to use Ltrim and Rtrim if you have:-
Dim str AsString = " This is a Test and has eight words "
Jump to PostThat looks good, but you might have to use Ltrim and Rtrim if you have:-
Dim str AsString = " This is a Test and has eight words "
And THIS is why collaborative development is so much fun! Nice catch!
Ned
Jump to PostYou can also use something like this:
Dim str As String = " This is a : Test and has eight , words " Dim SplitChar As Char() = {" "c, ","c, ":"c} Dim ary As String() = str.Split(SplitChar, StringSplitOptions.RemoveEmptyEntries)
This code looks for space , a …
All 26 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.