pointer+size instead of null-terminated strings

22 views
Skip to first unread message

supsm17

unread,
Mar 20, 2024, 6:30:00 PMMar 20
to fltk.general
I think it would be helpful to have pointer+size strings for something like Fl_Text_Buffer::append, since with something like C++17 string_view it is not possible to guarantee null termination.
It may also be worth considering std::string_view as an alternative to std::string in some cases for future FLTK, since string view is non-owning and therefore much cheaper to copy (this is especially prominent when converting to/from C-strings as many applications might).

supsm17

unread,
Mar 21, 2024, 2:27:54 PMMar 21
to fltk.general
My apologies, it appears that fltk 1.4 already has this change and I was looking at outdated documentation. Thank you for this.
Reply all
Reply to author
Forward
0 new messages