aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/StringUtil.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/FbTk/StringUtil.cc')
-rw-r--r--src/FbTk/StringUtil.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/FbTk/StringUtil.cc b/src/FbTk/StringUtil.cc
index 26dbb84..e1af2c2 100644
--- a/src/FbTk/StringUtil.cc
+++ b/src/FbTk/StringUtil.cc
@@ -19,7 +19,7 @@
19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 19// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20// DEALINGS IN THE SOFTWARE. 20// DEALINGS IN THE SOFTWARE.
21 21
22// $Id: StringUtil.cc,v 1.5 2003/08/22 19:38:00 fluxgen Exp $ 22// $Id: StringUtil.cc,v 1.6 2003/08/22 22:11:19 fluxgen Exp $
23 23
24#include "StringUtil.hh" 24#include "StringUtil.hh"
25 25
@@ -171,6 +171,13 @@ std::string toUpper(const std::string &conv) {
171 return ret; 171 return ret;
172} 172}
173 173
174std::string basename(const std::string &filename) {
175 std::string::size_type first_pos = filename.find_last_of("/");
176 if (first_pos != std::string::npos)
177 return filename.substr(first_pos + 1);
178 return filename;
179}
180
174}; // end namespace StringUtil 181}; // end namespace StringUtil
175 182
176}; // end namespace FbTk 183}; // end namespace FbTk