mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-15 11:06:32 +01:00
Merged with trunk, and a few trivial GUI updates etc.
git-svn-id: svn://localhost/ardour2/branches/midi@664 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
5dc4abef79
commit
22c20ab6f2
200 changed files with 5920 additions and 12700 deletions
20
libs/pbd/basename.cc
Normal file
20
libs/pbd/basename.cc
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#include <iostream>
|
||||
#include <string.h>
|
||||
#include <pbd/basename.h>
|
||||
|
||||
|
||||
// implement this using Glib::path_get_basename
|
||||
std::string
|
||||
PBD::basename_nosuffix (const std::string& str)
|
||||
{
|
||||
std::string::size_type slash = str.find_last_of ('/');
|
||||
std::string noslash;
|
||||
|
||||
if (slash == std::string::npos) {
|
||||
noslash = str;
|
||||
} else {
|
||||
noslash = str.substr (slash+1);
|
||||
}
|
||||
|
||||
return noslash.substr (0, noslash.find_last_of ('.'));
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue