SPLIT()
-
hi, i need to use split() but i need to split string depends on complete word such as "welcome" and i put split("welcome") but the problem that the string include just three welcome but it gave me more that 60 when i asked lines.length-1 and when i but instead of welcome "w" letter and used split("w") it gave me the wanted value which is 3 i dont know why , i need to split whole word please help me
kilany
-
hi, i need to use split() but i need to split string depends on complete word such as "welcome" and i put split("welcome") but the problem that the string include just three welcome but it gave me more that 60 when i asked lines.length-1 and when i but instead of welcome "w" letter and used split("w") it gave me the wanted value which is 3 i dont know why , i need to split whole word please help me
kilany
It looks like VB is "helpful" here, and automatically converts your string to an array of characters, so that you are splitting on any of the characters in the string, not the whole string. Put the string in an array of strings and use the array in the call to Split. If you only want to count the occurances, a Regex is better suited for this.
--- b { font-weight: normal; }