mirror of
https://github.com/znc/znc.git
synced 2026-03-28 17:42:41 +01:00
CString::Starts/EndsWith(): allow specifying case sensitivity
This commit is contained in:
@@ -1100,12 +1100,12 @@ bool CString::TrimSuffix(const CString& sSuffix) {
|
||||
}
|
||||
}
|
||||
|
||||
bool CString::StartsWith(const CString& sPrefix) const {
|
||||
return Left(sPrefix.length()).Equals(sPrefix);
|
||||
bool CString::StartsWith(const CString& sPrefix, CaseSensitivity cs) const {
|
||||
return Left(sPrefix.length()).Equals(sPrefix, cs);
|
||||
}
|
||||
|
||||
bool CString::EndsWith(const CString& sSuffix) const {
|
||||
return Right(sSuffix.length()).Equals(sSuffix);
|
||||
bool CString::EndsWith(const CString& sSuffix, CaseSensitivity cs) const {
|
||||
return Right(sSuffix.length()).Equals(sSuffix, cs);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user