Dear all Master,
I need Your help please.
-UCCX 7.0 premium
-Nuance recognizer 9.0
ABC = string var.
ABC = "this is sample"
2 space character in ABC string var.
How to find out how many space character in ABC var ?
Create a int variable called whatever you want, then insert a SET step.
Set the variable to the new int you created, and then paste this into the 'value' field:
String myarray = teststring.split(" ");
return myarray.length -1 ;
Basically it splits the string into chunks each time it hits the " " character.
This results in an array of the resulting chunks (i.e. words), which is one more than the number of spaces. -1 from that, and you have your int variable set to the number of spaces.
Please rate helpful posts...