PIIODevice fullPathPrefix returns PIConstChars
This commit is contained in:
@@ -23,10 +23,7 @@
|
||||
//! \addtogroup Core
|
||||
//! \{
|
||||
//! \~\class PIConstChars piconstchars.h
|
||||
//! \~\brief
|
||||
//! \~english C-String class
|
||||
//! \~russian Класс C-строки
|
||||
//!
|
||||
//! \~\details
|
||||
//! \~english \section PICout_sec0 Synopsis
|
||||
//! \~russian \section PICout_sec0 Краткий обзор
|
||||
//! \~english
|
||||
@@ -54,12 +51,24 @@ bool PIConstChars::startsWith(const PIConstChars & str) const {
|
||||
}
|
||||
|
||||
|
||||
bool PIConstChars::startsWith(const char c) const {
|
||||
if (size() < 1) return false;
|
||||
return str[0] == c;
|
||||
}
|
||||
|
||||
|
||||
bool PIConstChars::endsWith(const PIConstChars & str) const {
|
||||
if (size() < str.size()) return false;
|
||||
return str == right(str.size());
|
||||
}
|
||||
|
||||
|
||||
bool PIConstChars::endsWith(const char c) const {
|
||||
if (size() < 1) return false;
|
||||
return str[len - 1] == c;
|
||||
}
|
||||
|
||||
|
||||
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