Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upString and Char #725
Comments
evancz
added
the
meta
label
Sep 23, 2016
elm
locked and limited conversation to collaborators
Sep 23, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
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.
|
I fixed I decided that defaulting to the always-correct version for |
evancz commentedSep 23, 2016
•
edited
Edited 1 time
-
evancz
edited Mar 27, 2017 (most recent)
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:
String.reverseacts weird with certain characters.Char.fromCodeandString.toListact weird with certain characters.String.lengthworks like JavaScript