I have an array of string, it apron random figures, for example:"475759403048575663648495004945757590
" . How can I remove the first 10 digits ?
Asked
Active
Viewed 3,588 times
0

Shoaib Chikate
- 8,665
- 12
- 47
- 70

user3374308
- 37
- 1
- 4
-
1where is the `array` ? – Nambi Mar 04 '14 at 06:09
-
Read the documentation or do some research online. This is a Java question, not an Android question. [Documentation](http://docs.oracle.com/javase/7/docs/api/java/lang/String.html) – BLaZuRE Mar 04 '14 at 06:10
-
why not use `substring` metod of `String class` – Mar 04 '14 at 06:10
-
1dude u asked the same thing yesterday and I didn't get any feedback at all.. http://stackoverflow.com/a/22143547/3239917 – MCollard Mar 04 '14 at 07:39
3 Answers
6
You can use substring()
method from Java's String class like below code,
String str = "475759403048575663648495004945757590"
str = str.substring(10);

Lucifer
- 29,392
- 25
- 90
- 143
1
Use substring method of String class :
String removeSubString = "475759403048575663648495004945757590"
removeSubString = removeString.substring(10);

Shailendra Madda
- 20,649
- 15
- 100
- 138
1
You can use substring(int beginIndex) method of String class which returns a new string that is a substring of this string.
String str="4785214522396554786324";
str=str.substring(10);
It will form String starting from 10th index till end of String.

Shoaib Chikate
- 8,665
- 12
- 47
- 70