PIIODevice registration dramatically optimization
This commit is contained in:
@@ -48,6 +48,18 @@
|
||||
//! \}
|
||||
|
||||
|
||||
bool PIConstChars::startsWith(const PIConstChars & str) const {
|
||||
if (size() < str.size()) return false;
|
||||
return str == left(str.size());
|
||||
}
|
||||
|
||||
|
||||
bool PIConstChars::endsWith(const PIConstChars & str) const {
|
||||
if (size() < str.size()) return false;
|
||||
return str == right(str.size());
|
||||
}
|
||||
|
||||
|
||||
PIConstChars PIConstChars::mid(const int start, const int len) const {
|
||||
int s = start, l = len;
|
||||
if (l == 0 || s >= (int)size() || isEmpty()) return PIConstChars("");
|
||||
|
||||
Reference in New Issue
Block a user