From d12d16f6abd2b414401007e0f975f369b5262097 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sun, 9 Nov 2025 13:08:12 +0100 Subject: Fix documentation of fl_filename_ext --- src/filename_ext.cxx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/filename_ext.cxx b/src/filename_ext.cxx index 201e7383f..a4d86937b 100644 --- a/src/filename_ext.cxx +++ b/src/filename_ext.cxx @@ -23,10 +23,13 @@ [..] const char *out; out = fl_filename_ext("/some/path/foo.txt"); // result: ".txt" - out = fl_filename_ext("/some/path/foo"); // result: NULL + out = fl_filename_ext("/some/path/foo"); // result: "" \endcode \param[in] buf the filename to be parsed - \return a pointer to the extension (including '.') if any or NULL otherwise + \return a pointer to the extension (including '.') if one was found, + or a pointer to the terminating NUL character (effectively a pointer + to an empty string) if no extension was found. + \see fl_filename_ext_str(const std::string &filename) */ const char *fl_filename_ext(const char *buf) { return Fl::system_driver()->filename_ext(buf); -- cgit v1.2.3