flix / flix

The Flix Programming Language
https://flix.dev/
Other
2.08k stars 150 forks source link

Add String.deburr? #1236

Closed magnus-madsen closed 1 year ago

magnus-madsen commented 3 years ago

http://hackage.haskell.org/package/deburr-0.1.0.1/docs/Text-Deburr.html

stephentetley commented 3 years ago

I had a quick look at doing this with java.text.Normalizer as suggested in the link below, but the equivalent code in Flix (calling the same Java functions) didn't work whereas an all Java prototype did.

https://stackoverflow.com/questions/3322152/is-there-a-way-to-get-rid-of-accents-and-convert-a-whole-string-to-regular-lette

I'll have to dig deeper into the actual string data in Flix to see if the input was equal.

magnus-madsen commented 2 years ago

Before you write any code, give a quick description of how you intend to implement it. For inspiration try to take a look at other librarys (e.g. lodash, underscore from JavaScript) or what else you can find :)

The idea is to discuss an existing implementation before we try to implement it in Flix.

magnus-madsen commented 2 years ago

(Comment was for Nina)

magnus-madsen commented 1 year ago

Also too esoteric.

stephentetley commented 1 year ago

I'd forgotten about it, but I wrote the code here:

https://github.com/stephentetley/flix-sandbox/blob/master/src/FlixSandbox/Text/Normalizer.flix