FLTK logo

[fltk.general] pointer+size instead of null-terminated strings

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

pointer+size instead of null-terminated strings supsm17 15:30 Mar 20  
  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).

--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/b59cf4bd-8d48-4f81-93d5-809cd50767b0n%40googlegroups.com.
Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

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