FLTK logo

Re: [fltk.coredev] RFC/vote: A fl_utf8 function for detecting continuation bytes

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Library      Forums      Links      Apps     Login 
[  All Forums  |  Back to fltk.coredev  ]
 
[ Previous Message ] [ New Message | Reply ] [ Next Message ]

Re: RFC/vote: A fl_utf8 function for detecting continuation bytes Greg Ercolano 19:17 Jul 20  
 

On 7/20/26 10:33, 'melcher....@googlemail.com' via fltk.coredev wrote:

That was ssurprsingly entertaining for me ;-D

    Ha, glad for that..!

So how about (which could be confused with the start and end of a string):
    `fl_utf8_is_head()` and `fl_utf8_is_tail()`
or the long version which makes the job very clear
    `fl_utf8_is_leading_byte()` and `fl_utf8_is_trailing_byte()` or `fl_utf8_is_continuation_byte()`

    Interesting.. but I'mma stick with (2) for fltk_utf8_is_cont() or even fltk_utf8_is_continuation() because that prevents needing two functions (e.g. head vs. tail), since is_continuation() covers both by simply telling you if you're 'in the middle or not'.

    Also, having one function instead of two means a parent walking the string either 'to the beginning' or 'to the end' doesn't have to worry about using the wrong function accidentally.

--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/fltkcoredev/4331f9e1-6329-41ba-9d83-4ef1b789f136%40seriss.com.
[ Direct Link to Message ]
 
     
[ Previous Message ] [ New Message | Reply ] [ Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2026 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.