Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String str = "12345.67";
- String res = str.substring(str.indexOf('.')); // .67
- String baseString = "12345.67";
- String maybeContainedInBase = ".67";
- if (baseString.contains(maybeContainedInBase)
- System.out.println("base contains the other String");
- else
- System.out.println("base does not contain the other String");
Add Comment
Please, Sign In to add comment