Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to ?

Status
Not open for further replies.

MSB18

Programmer
Nov 2, 2001
5
GB
I know how to add two strings together using java, but how do you seperate them a certain point, such as after the 'B' in ABCD to make 'AB' and 'CD'????
 
Like this:
String s = "ABCD";
String s1 = s.substring(0,s.indexOf("B")+1);
String s2 = s.substring(s.indexOf("B")+1,s.length());

-Vepo
 
Thanks for your help, i'm very new to java programming, but have programmed before in Delphi, i just could not work this out, thank you again

MSB18
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top