hylo-lang / hylo

The Hylo programming language
https://www.hylo-lang.org
Apache License 2.0
1.21k stars 56 forks source link

String Encoding #1428

Open jayadevanraja opened 6 months ago

jayadevanraja commented 6 months ago

I have never seen any documentation regarding the default string encoding. Is it UTF-16 (as in Java, Dotnet, Dart, JavaScript, etcetera), or is it in UTF-8?

kyouko-taiga commented 6 months ago

The API is so that you do not need to worry about the encoding of String's representation in most use cases. A string is simply "a collection of characters".

You can get the underlying representation, which is a collection of code points stored as a contiguous byte buffer using UTF-8 encoding.