Add integer suffix
This commit is contained in:
parent
740fd102e1
commit
af5253b8b0
1 changed files with 10 additions and 0 deletions
|
@ -280,6 +280,16 @@ public class Algorithms {
|
|||
return "";
|
||||
}
|
||||
|
||||
public static String extractOnlyIntegerSuffix(String s) {
|
||||
int k = 0;
|
||||
for (; k < s.length(); k++) {
|
||||
if (Character.isDigit(s.charAt(k))) {
|
||||
return s.substring(k);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public static String extractIntegerSuffix(String s) {
|
||||
int k = 0;
|
||||
for (; k < s.length(); k++) {
|
||||
|
|
Loading…
Reference in a new issue