Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
2.0.5
-
None
-
None
Description
I find that I'm often looking for a findResult method for String. Collection seems to have one but String does not for some reason. find works well but only if you need to create a string from matches. Example:
line.findResult(~/(\S+) (\d+)/)
{ new MyObject(it[1], it[2]) }line.findResult(~/(\d+)/)
{ it[1] as Integer }What do you all think?