Created
August 16, 2011 23:49
-
-
Save bluepapa32/1150460 to your computer and use it in GitHub Desktop.
お題:文字列を先頭から見て同じところまで除去
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def hoge(String... args) { | |
args*.substring(args*.toList().transpose().findIndexOf{ it.unique().size() != 1 }) | |
} | |
hoge("12345", "67890", "12abc") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://d.hatena.ne.jp/fumokmm/20110812/1313138407