elm-community / string-extra

String helper functions for Elm.
http://package.elm-lang.org/packages/elm-community/string-extra/latest
BSD 3-Clause "New" or "Revised" License
34 stars 26 forks source link

Bug: rightOf/leftOf does not work with trailing newline after/before the pattern #56

Open ad-si opened 1 year ago

ad-si commented 1 year ago

String.Extra.rightOf "_" "abc_\ndef" should return "\ndef", but returns ""

Here is an example on Ellie:

https://ellie-app.com/kr7KLBVx8xQa1

ad-si commented 1 year ago

Same for leftOf: String.Extra.leftOf "_" "abc\n_def" returns ""