aboutsummaryrefslogtreecommitdiff
path: root/src/FbTk/StringUtil.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-08-22 22:11:19 (GMT)
committerfluxgen <fluxgen>2003-08-22 22:11:19 (GMT)
commitdafe9f9fb6c2c71711b172b1e73c2da0664a2bd3 (patch)
treef93679f6b0f04d253d11304cc3534716955bdfd7 /src/FbTk/StringUtil.cc
parent062768a077b03a67b049b3c2d98341b00d5445dd (diff)
downloadfluxbox-dafe9f9fb6c2c71711b172b1e73c2da0664a2bd3.zip
fluxbox-dafe9f9fb6c2c71711b172b1e73c2da0664a2bd3.tar.bz2
fixed basename
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