summaryrefslogtreecommitdiffstats
path: root/src/qcstring.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qcstring.h')
-rw-r--r--src/qcstring.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qcstring.h b/src/qcstring.h
index 886573a..ba5ac95 100644
--- a/src/qcstring.h
+++ b/src/qcstring.h
@@ -392,6 +392,12 @@ class QCString
return m_rep.rfind(s,0)==0; // looking "backward" starting and ending at index 0
}
+ bool startsWith( const QCString &s ) const
+ {
+ if (m_rep.empty() || s.isEmpty()) return s.isEmpty();
+ return m_rep.rfind(s.str(),0)==0; // looking "backward" starting and ending at index 0
+ }
+
#define HAS_IMPLICIT_CAST_TO_PLAIN_C_STRING 0
#if HAS_IMPLICIT_CAST_TO_PLAIN_C_STRING
/** Converts the string to a plain C string */