Advertisement
ogre_x

Strings, strings

May 18th, 2016
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.29 KB | None | 0 0
  1. method(String value)
  2. ...
  3. String foreDubbelHash;
  4. int indexDubbelHash = value.indexOf("##);
  5. if (indexDubbelHash > 0) {
  6.    foreDubbelHash = value.substring(0, indexDubbelHash - 1);
  7. } else {
  8.    foreDubbelHash = value;
  9. }
  10. ...
  11.            
  12. //StringUtils has it:
  13. StringUtils.substringBefore(value, "##");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement