roc-lang / unicode

Universal Permissive License v1.0
7 stars 5 forks source link

Adding functions to compute the visual width of east asian characters #8

Closed DilsonHiga closed 2 months ago

DilsonHiga commented 2 months ago

Implement function to compute the East Asian Width Property of codepoints as decribed in issue 6.

I am new not only to roc but to functional programming in general, so I expect this code to be unidiomatic. I am open to criticism and to fix any issues.

The results of the function have been tested against other open source libraries.

DilsonHiga commented 2 months ago

Thank you for your review!

I added a commit in which I incorporated the functions for getting the EAW property and the width of code points into the CodePoint module, but I'm not sure if that is the way to do it.

I have also added some tests to both the generated module and it's generator.