Showing 6 results.
Items per Page 50
of 1

CVP Forum

« Back to CVP - All Versions

CVP Sub Stringing

Combination View Flat View Tree View
Threads [ Previous | Next ]
does anyone have any code examples of breaking up a string value by using sub-stringing.  Trying to break up SSN, Phone # and inserting spaces to compensate for a CVP bug preventing Say it smart from working without TTS.  thanks

are you trying to do a substring, or a string replace?

Cisco Developer Community Forums wrote:
> Gregory Burton has created a new message in the forum "CVP - All
> Versions":
>
> --------------------------------------------------------------
> does anyone have any code examples of breaking up a string value by
> using sub-stringing. Trying to break up SSN, Phone # and inserting
> spaces to compensate for a CVP bug preventing Say it smart from
> working without TTS. thanks
> --
> To respond to this post, please click the following link:
>
> <http://developer.cisco.com/web/cvp/forums/-/message_boards/message/1195098>
>
> or simply reply to this email.

As example, trying to take value of ssn to parse out position 1-3, 4-5, 6-9 into seperate vars.  then create my audio element with digit by digit for each of the group of three with dead air between the three. Or at least do the parsing within the audio element....

If you post your email address, I can send you a substring element -
it's not production ready, but better than nothing.
Do you know java?

Janine
www.TrainingTheExperts.com


Cisco Developer Community Forums wrote:
> Gregory Burton has created a new message in the forum "CVP - All
> Versions":
>
> --------------------------------------------------------------
> As example, trying to take value of ssn to parse out position 1-3,
> 4-5, 6-9 into seperate vars. then create my audio element with digit
> by digit for each of the group of three with dead air between the three.
> --
> To respond to this post, please click the following link:
>
> <http://developer.cisco.com/web/cvp/forums/-/message_boards/message/1195114>
>
> or simply reply to this email.

gburton@cisco.com
 
Thanks!!!

Janine, by chance do you have a class file that gives me back the length of a string value?

Hi,
I've got a couple of classes you can use, one for string length, the other to substring a string value (you can set the start point to be one of "String_Start","Mid", or "End", if "End" then the last nn chars are returned.  There is another setting for the number of chars to pull out.  These are for a specific project I have, if you want I can send you the source and you can modify the package, you'll need to compile these with the Cisco required jar file in the classpath (framework.jar, from memory).  I use ant build for the entire project.
 
James