Skip to content

Instantly share code, notes, and snippets.

@palmerabollo
Created June 26, 2013 21:55
Show Gist options
  • Save palmerabollo/5872113 to your computer and use it in GitHub Desktop.
Save palmerabollo/5872113 to your computer and use it in GitHub Desktop.
public String apply(String input) {
char[] chars = input.toCharArray();
int index;
for (index = 0; index < input.length(); index++) {
if (chars[index] != '0') {
break;
}
}
return (index == 0) ? input : input.substring(index);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment