Created
August 19, 2023 21:40
-
-
Save marvhus/789978f7164be2dab678fed279c157ae to your computer and use it in GitHub Desktop.
Jai u8 to string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
u8_to_string :: (c: u8) -> string { | |
buff: String_Builder; | |
init_string_builder(*buff); | |
append(*buff, c); | |
return builder_to_string(*buff); | |
} | |
u8_to_string :: (cs: []u8) -> string { | |
buff: String_Builder; | |
init_string_builder(*buff); | |
for c: cs { | |
append(*buff, c); | |
} | |
return builder_to_string(*buff); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment