View Single Post
  #10 (permalink)  
Old 11-23-2009, 03:55 PM
sky sky is offline
Member
 
Join Date: Nov 2009
Posts: 90
Rep Power: 0
sky is on a distinguished road
Default
Yes, thats one possibility. I would recommend you to use first the trim() method to remove spaces from the beginning and end. Then, you can use the startsWith() method to make sure your String begins with "0b" and finally the substring() method starting from index 1 to return the other part of the string. Another possibilities are the methods replace() or replaceAll(). Have a look at this website to know the descriptions of the String methods:

String (Java 2 Platform SE v1.4.2)
Reply With Quote