Need to split a string into two parts in java
Posted
by Reddy
on Stack Overflow
See other posts from Stack Overflow
or by Reddy
Published on 2010-06-08T07:59:02Z
Indexed on
2010/06/08
8:02 UTC
Read the original article
Hit count: 185
I have a string which contains a contiguous chunk of digits and then a contiguous chunk of characters. I need to split them into two parts (one integer part, and one string).
I tried using String.split("\D", 1), but it is eating up first character. I checked all the String API and didn't find a suitable method.
Is there any method for doing this thing?
© Stack Overflow or respective owner