Skip to content

Instantly share code, notes, and snippets.

@bluepapa32
Created August 16, 2011 23:49
Show Gist options
  • Save bluepapa32/1150460 to your computer and use it in GitHub Desktop.
Save bluepapa32/1150460 to your computer and use it in GitHub Desktop.
お題:文字列を先頭から見て同じところまで除去
def hoge(String... args) {
args*.substring(args*.toList().transpose().findIndexOf{ it.unique().size() != 1 })
}
hoge("12345", "67890", "12abc")
@bluepapa32
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment