runeflobakk / motif

A Java library helping you to compose behavior from smaller parts.
http://runeflobakk.github.io/motif
6 stars 0 forks source link

Strings.indexOf(..): Fn<String, Integer> #18

Closed runeflobakk closed 10 years ago

runeflobakk commented 10 years ago

Map a string to the index of the first appearing character, much the same way as java.lang.String.indexOf.

Should probably return null instead of -1 for no matches, in order to correctly map an Optional to None.

May also include a variant to find the beginning index of a substring? Strings.indexOf(String)

runeflobakk commented 10 years ago

Pushed to dev branch a37fd3be5b735161266b6fb9eb91044ba243dab8