|
|
On 4/26/21 9:38 PM Bill Spitzak wrote:
Returning nullptr is a very bad idea, as almost any calling code will
have to test for this, usually to change it right back to "".
Okay...
Returning "" (actually the nul at the end of the filename) if there is
no extension, and returning starting from the period if there is one, is
the original design and was always intended. This was so the offset into
the filename was where the period would be written if you wanted to
change the extension.
Understood. Thanks for the clarification.
Then we should really update the docs.
I agree it would be best to fix it to ignore any period before the first
non-period after the last slash, so that ".hidden" and ".." and so on
act like they have no extension.
Yep, and that would then also be platform independent.
--
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/cc5c6e37-c52b-39c0-f627-6217dc5b7cfc%40online.de.
[ Direct Link to Message ] | |
|
| |