]> Kevux Git Server - fll/commit
Update: implement utf strings, ensure endianess, and add isgraph()/isspace() methods...
authorKevin Day <thekevinday@gmail.com>
Sun, 1 Sep 2019 07:13:01 +0000 (02:13 -0500)
committerKevin Day <thekevinday@gmail.com>
Sun, 1 Sep 2019 07:13:01 +0000 (02:13 -0500)
commite1fc481c707a2b87b6205f4ea5228e148ec7521a
tree9562b38b76949b037558b4046cf25ac57359ff54
parent6ab684f6f3e7afcd1a2e8dea2cc639e14d6b6788
Update: implement utf strings, ensure endianess, and add isgraph()/isspace() methods to UTF-8 equivalents

Expand the UTF-8 character type (a 4-byte wide character represented as a big-endian 32-bit integer) into working like f_string and f_dynamic_string.
Provide all similar functionality.

I have decided that the isgraph(), isspace(), etc.. functions fo UTF-8 should also call the ASCII equivalents.
Update all relating code.

Use memcmp() and memcpy() for comparing UTF-8 characters class (4-byte integer) to the UTF-8 char strings (multiple 1-byte char).
When doing this, make sure to do so with the proper endianess.

Add missing f_utf_character_to_char() function.

Wrap some of the macros parameters in parenthesis for safety reasons.

Add f_utf_is_big_endian() and document its use.

Provide custom EOL, EOS, and placeholder defines for UTF characters (4-byte integers).
12 files changed:
build/level_1/settings
build/monolithic/settings
level_0/f_utf/c/utf.c
level_0/f_utf/c/utf.h
level_1/fl_fss/c/fss.c
level_1/fl_fss/data/build/settings
level_1/fl_strings/c/strings.c
level_1/fl_strings/c/strings.h
level_1/fl_utf/c/utf.c [new file with mode: 0644]
level_1/fl_utf/c/utf.h [new file with mode: 0644]
level_1/fl_utf/data/build/dependencies [new file with mode: 0644]
level_1/fl_utf/data/build/settings [new file with mode: 0644]