diff options
| author | Matthias Melcher <github@matthiasm.com> | 2025-11-09 13:08:12 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2025-11-09 13:09:46 +0100 |
| commit | d12d16f6abd2b414401007e0f975f369b5262097 (patch) | |
| tree | 821042957f73b87fdda85827fd4f071cb91b4eef /src | |
| parent | c12105193cf1f80e9ea68ddd8cb986dcd0a7d427 (diff) | |
Fix documentation of fl_filename_ext
Diffstat (limited to 'src')
| -rw-r--r-- | src/filename_ext.cxx | 7 |
1 files changed, 5 insertions, 2 deletions
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); |
