Guest User

Untitled

a guest
Jun 22nd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. String str = "12345.67";
  2. String res = str.substring(str.indexOf('.')); // .67
  3.  
  4. String baseString = "12345.67";
  5. String maybeContainedInBase = ".67";
  6. if (baseString.contains(maybeContainedInBase)
  7. System.out.println("base contains the other String");
  8. else
  9. System.out.println("base does not contain the other String");
Add Comment
Please, Sign In to add comment