2005-05-13 16:47:18 -04:00
|
|
|
#include <pbd/basename.h>
|
2006-12-21 13:38:00 -05:00
|
|
|
#include <glibmm/miscutils.h>
|
2005-05-13 16:47:18 -04:00
|
|
|
|
2006-12-21 13:38:00 -05:00
|
|
|
using Glib::ustring;
|
2005-05-13 16:47:18 -04:00
|
|
|
|
2006-12-21 13:38:00 -05:00
|
|
|
ustring
|
|
|
|
PBD::basename_nosuffix (ustring str)
|
2005-05-13 16:47:18 -04:00
|
|
|
{
|
2006-12-21 13:38:00 -05:00
|
|
|
ustring base = Glib::path_get_basename (str);
|
2005-05-13 16:47:18 -04:00
|
|
|
|
2006-12-21 13:38:00 -05:00
|
|
|
return base.substr (0, base.find_last_of ('.'));
|
2005-05-13 16:47:18 -04:00
|
|
|
|
|
|
|
}
|