From 893a0a6ad85411a57c1225af03260b34561377c7 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 4 Sep 2024 18:26:00 +0200 Subject: leave some comments on what to do when converting the parser to Unicode (refs #5) --- src/string-utils.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/string-utils.c') diff --git a/src/string-utils.c b/src/string-utils.c index e1013f5..ac5835b 100644 --- a/src/string-utils.c +++ b/src/string-utils.c @@ -91,7 +91,18 @@ teco_string_diff(const teco_string_t *a, const gchar *b, gsize b_len) return len; } -/** @memberof teco_string_t */ +/** + * Get the length of the prefix common to two strings + * without considering case. + * + * @fixme This is currently only used for symbols and one/two letter + * Q-Register names, which cannot be UTF-8. + * If we rewrote this to perform Unicode case folding, we would + * also have to check for character validity. + * Once our parser is Unicode-aware, this is not necessary. + * + * @memberof teco_string_t + */ gsize teco_string_casediff(const teco_string_t *a, const gchar *b, gsize b_len) { -- cgit v1.2.3