Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.

Posts: 255
Registered: ‎05-03-2012
My Device: 9930
My Carrier: Vodafone
Accepted Solution

How to split a String

[ Edited ]

I have a string which is i am getting at runtime. its length is variable. Suppose its "NUMBER=ABC1004457844| This is the number you wanted". I want to get String between "=" and "|". It can be variable as i am getting it at runtime from server. This pattern is same in each response from server.

Please someone help. Its urgent.

Posts: 206
Registered: ‎02-22-2011
My Device: BB TORCH & 9800
My Carrier: idea

Re: How to split a String

Hi you can use the indexof and substring methods in this case, indexof method takes the character and returns the index of provided character, now give your required characters to indexof() alternately and get those indexes,now use the substring(startingIndex,endingIndex) for ur required string.
* Give kudos when you like it
* Mark it as a solution if it fixes your issue