From 66684c6690d43c8f3277e1b07e1d86b372cd5f3a Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 8 Jul 2014 12:24:56 -0400 Subject: Add PBD::get_suffix() for ripping file suffixes from paths --- libs/pbd/pbd/file_utils.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libs/pbd/pbd/file_utils.h') diff --git a/libs/pbd/pbd/file_utils.h b/libs/pbd/pbd/file_utils.h index 9ef5374a0a..cb0aa38065 100644 --- a/libs/pbd/pbd/file_utils.h +++ b/libs/pbd/pbd/file_utils.h @@ -181,6 +181,13 @@ LIBPBD_API void copy_files(const std::string & from_path, const std::string & to */ LIBPBD_API std::string get_absolute_path (const std::string &); +/** + * Take a path/filename and return the suffix (characters beyond the last '.' + * @return A string containing the suffix, which will be empty + * if there are no '.' characters in the path/filename. + */ +LIBPBD_API std::string get_suffix (const std::string &); + /** * Find out if `needle' is a file or directory within the * directory `haystack'. -- cgit v1.2.3