From a8d65195cea6ae0860520f5132faf36781ce135d Mon Sep 17 00:00:00 2001 From: Vincent Bénony Date: Wed, 2 Dec 2015 14:43:54 +0100 Subject: IOS: Adds an helper function --- devtools/create_project/create_project.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'devtools/create_project/create_project.cpp') diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index b450dafd01..2faf39a340 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -1056,6 +1056,12 @@ void splitFilename(const std::string &fileName, std::string &name, std::string & ext = (dot == std::string::npos) ? std::string() : fileName.substr(dot + 1); } +std::string basename(const std::string &fileName) { + const std::string::size_type slash = fileName.find_last_of('/'); + if (slash == std::string::npos) return fileName; + return fileName.substr(slash + 1); +} + bool producesObjectFile(const std::string &fileName) { std::string n, ext; splitFilename(fileName, n, ext); -- cgit v1.2.3