color collection, now only CSS colors
PIVariantTypes::Color from/to string (with CSS names)
This commit is contained in:
@@ -522,6 +522,27 @@ PIString PIString::simplified() const {
|
||||
}
|
||||
|
||||
|
||||
PIString & PIString::mask(const PIString & symbols, PIChar mc) {
|
||||
for (int i = 0; i < size_s(); ++i)
|
||||
if (symbols.contains(at(i))) {
|
||||
insert(i, mc);
|
||||
++i;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
PIString & PIString::unmask(const PIString & symbols, const PIChar mc) {
|
||||
for (int i = 0; i < size_s() - 1; ++i)
|
||||
if (at(i) == mc) {
|
||||
if (symbols.contains(at(i + 1))) {
|
||||
remove(i);
|
||||
}
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
PIString & PIString::operator +=(const char * str) {
|
||||
if (!str) return *this;
|
||||
appendFromChars(str, -1, __syslocname__);
|
||||
|
||||
Reference in New Issue
Block a user