New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

String and Char #725

Closed
evancz opened this Issue Sep 23, 2016 · 1 comment

Comments

Projects
None yet
1 participant
@evancz
Member

evancz commented Sep 23, 2016

This is a meta issue. If you have something that seems related, open a new issue and we'll do the appropriate bookkeeping!

It looks like we inherit some weird unicode things from JS, so special precautions may be necessary. Here are cases that folks have pointed out so far:

  • #625 - String.reverse acts weird with certain characters.
  • #387 - Char.fromCode and String.toList act weird with certain characters.
  • #626 - String.length works like JavaScript

@evancz evancz added the meta label Sep 23, 2016

@elm elm locked and limited conversation to collaborators Sep 23, 2016

@evancz

This comment has been minimized.

Show comment
Hide comment
@evancz

evancz Jul 10, 2017

Member

I fixed String.reverse, Char.fromCode, and String.toList to work with the JS representation of strings.

I decided that defaulting to the always-correct version for String.length would be too costly, and you can use betterLength xs = String.foldl (\_ n -> n + 1) 0 xs if you are willing to pay extra for that data.

Member

evancz commented Jul 10, 2017

I fixed String.reverse, Char.fromCode, and String.toList to work with the JS representation of strings.

I decided that defaulting to the always-correct version for String.length would be too costly, and you can use betterLength xs = String.foldl (\_ n -> n + 1) 0 xs if you are willing to pay extra for that data.

@evancz evancz closed this Jul 10, 2017

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