diff options
Diffstat (limited to 'src/io/sys.cpp')
| -rw-r--r-- | src/io/sys.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/io/sys.cpp b/src/io/sys.cpp index e83861237..5f19ee5db 100644 --- a/src/io/sys.cpp +++ b/src/io/sys.cpp @@ -355,6 +355,15 @@ gchar* Inkscape::IO::sanitizeString( gchar const * str ) return result; } +/* + * Returns the file extension of a path/filename + */ +Glib::ustring Inkscape::IO::get_file_extension(Glib::ustring path) +{ + Glib::ustring::size_type period_location = path.find_last_of("."); + return path.substr(period_location); +} + /* Local Variables: mode:c++ |
