|
-
October 31st, 2003, 10:59 AM
#1
basic string
I have a basic string "phraseinList", I want to know how many words are there in this string, the words are seperated by ' ' or '-'
For example:
string phraseinList = "Fronto-parietal lobe";
Note: '-' only appears in some of the strings.
I want the result "3". I know I can do that by countint ' ' and '-', but is there any simple way to do that?
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|