diff options
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/util.cpp b/src/util.cpp index 8d33369..cdeaaee 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -6970,4 +6970,19 @@ bool readInputFile(const char *fileName,BufStr &inBuf) return TRUE; } +// Replace %word by word in title +QCString filterTitle(const QCString &title) +{ + QCString tf; + static QRegExp re("%[A-Z_a-z]"); + int p=0,i,l; + while ((i=re.match(title,p,&l))!=-1) + { + tf+=title.mid(p,i-p); + tf+=title.mid(i+1,l-1); // skip % + p=i+l; + } + tf+=title.right(title.length()-p); + return tf; +} |