I want to count words in a variable to know how many words it contains, I assume it can be done by matching white spaces, assuming the variable is called 'vnum', how would I do that?
Also, how can I break up each word in 'vnum' into a separate value in an array? meaning if 'vnum' is how are you today, the array would be vnum = {"how", "are", "you", "today"}
Thanks!
Also, how can I break up each word in 'vnum' into a separate value in an array? meaning if 'vnum' is how are you today, the array would be vnum = {"how", "are", "you", "today"}
Thanks!