nitlang / nit

Nit language
http://nitlanguage.org
Apache License 2.0
239 stars 65 forks source link

First (and small) integration of the ICU library in Nit : locale and case modification #2757

Closed kugelbltz closed 5 years ago

kugelbltz commented 5 years ago

ICU

ICU (International Components for Unicode) is an API which implements algorithms provided by the Unicode Consortium in C.

locale.nit

Locale object which makes sure that the name of the locale is valid and handled by the ICU library

caseModification.nit

Addition of uppercase, lowercase and title in the String and CString classes using a CaseModification object.

lbajolet commented 5 years ago

Note: in my review I forgot to add that everything that is being contributed here has either very few or no documentation at all. If we are to merge this in core, this should be amended as well

kugelbltz commented 5 years ago

Thank you for your feedbacks @privat @R4PaSs ! I have commited all of my modifications following your comments. As for returning an empty string when a locale is invalid, the ICU library considers "" as the root locale (eg. "en_US_POSIX")