summaryrefslogtreecommitdiffstats
path: root/src/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 8f7765a..e97fe7f 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -6561,16 +6561,25 @@ QCString rtfFormatBmkStr(const char *name)
return *tag;
}
-QCString stripExtension(const char *fName)
+bool checkExtension(const char *fName, const char *ext)
+{
+ return (QCString(fName).right(QCString(ext).length())==ext);
+}
+
+QCString stripExtensionGeneral(const char *fName, const char *ext)
{
QCString result=fName;
- if (result.right(Doxygen::htmlFileExtension.length())==Doxygen::htmlFileExtension)
+ if (result.right(QCString(ext).length())==QCString(ext))
{
- result=result.left(result.length()-Doxygen::htmlFileExtension.length());
+ result=result.left(result.length()-QCString(ext).length());
}
return result;
}
+QCString stripExtension(const char *fName)
+{
+ return stripExtensionGeneral(fName, Doxygen::htmlFileExtension);
+}
void replaceNamespaceAliases(QCString &scope,int i)
{