summaryrefslogtreecommitdiffstats
path: root/qtools
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2005-05-08 21:32:24 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2005-05-08 21:32:24 (GMT)
commit23885c2f2db71f003578f0d1b44555c067bfd7a5 (patch)
treec4bbe961812e7008b9e85fd820596290c043c0f6 /qtools
parent5d31b7ab211586100301d6838be82f066f8f9af4 (diff)
downloadDoxygen-23885c2f2db71f003578f0d1b44555c067bfd7a5.zip
Doxygen-23885c2f2db71f003578f0d1b44555c067bfd7a5.tar.gz
Doxygen-23885c2f2db71f003578f0d1b44555c067bfd7a5.tar.bz2
Release-1.4.2-20050508
Diffstat (limited to 'qtools')
-rw-r--r--qtools/qcache.h2
-rw-r--r--qtools/scstring.cpp15
-rw-r--r--qtools/scstring.h1
3 files changed, 17 insertions, 1 deletions
diff --git a/qtools/qcache.h b/qtools/qcache.h
index 78cef3d..f15345e 100644
--- a/qtools/qcache.h
+++ b/qtools/qcache.h
@@ -101,7 +101,7 @@ public:
bool remove( const char *k )
{ return QGCache::remove_other(k); }
type *take( const char *k )
- { return (type *)QGCache::take_ascii(k); }
+ { return (type *)QGCache::take_other(k); }
type *find( const char *k, bool ref=TRUE ) const
{ return (type *)QGCache::find_other(k,ref);}
type *operator[]( const char *k ) const
diff --git a/qtools/scstring.cpp b/qtools/scstring.cpp
index 4a36755..18a5492 100644
--- a/qtools/scstring.cpp
+++ b/qtools/scstring.cpp
@@ -643,6 +643,21 @@ void SCString::msg_index( uint index )
#endif
}
+bool SCString::stripPrefix(const char *prefix)
+{
+ if (prefix==0) return FALSE;
+ uint plen = qstrlen(prefix);
+ if (m_data && qstrncmp(prefix,m_data,plen)==0) // prefix matches
+ {
+ uint len = qstrlen(m_data);
+ uint newlen = len-plen+1;
+ qmemmove(m_data,m_data+plen,newlen);
+ resize(newlen);
+ return TRUE;
+ }
+ return FALSE;
+}
+
//---------------------------------------------------------------------------
void *qmemmove( void *dst, const void *src, uint len )
diff --git a/qtools/scstring.h b/qtools/scstring.h
index 41dcfac..08de44b 100644
--- a/qtools/scstring.h
+++ b/qtools/scstring.h
@@ -64,6 +64,7 @@ public:
int contains( char c, bool cs=TRUE ) const;
int contains( const char *str, bool cs=TRUE ) const;
int contains( const QRegExp & ) const;
+ bool stripPrefix(const char *prefix);
SCString left( uint len ) const;
SCString right( uint len ) const;