04-16-2010 05:34 AM
Solved! Go to Solution.
04-16-2010 05:44 AM - edited 04-16-2010 05:46 AM
We've already done that here:
http://forums.ni.com/ni/board/message?board.id=170&thread.id=491463
but if you don't like that method and you can guarantee 100% of the time that each word will be seperated by a space, you can:
1) clear whitespace around the string.
2) pass it through the search and replace string function and replace all spaces with something
- the number of spaces +1 =number of words.
As I said in the other thread, this only works if you are dealing with WORDS.
If you are trying to convert the sentence "he has 10 cows" to pig latin, your function can handle it.
It can't handle Text speak like "R U coming round 2nite".
(Note it is the addition of a charcter at the start of a word which is causing a problem here. "It was bad (Very bad), so bad ..." is not handled at all well by your VI. I stand by my earlier code.)
James
04-16-2010 06:42 AM
04-16-2010 06:44 AM