37 lines
1.2 KiB
C++
37 lines
1.2 KiB
C++
#include "pip.h"
|
|
|
|
void print(PIConfig::Entry*e, PIString indent = "") {
|
|
piCout << indent << e->name() << "=" << e->value();
|
|
indent += " ";
|
|
e->children().forEach([=](PIConfig::Entry*e)->PIConfig::Entry*{print(e, indent); return e;});
|
|
}
|
|
|
|
int main() {
|
|
//piCout << __sysoemname__;
|
|
const char * s = "Eng, Русский №!123";
|
|
PIString str = PIString::fromUTF8(s);
|
|
//piCout << PIChar::fromUTF8("a").isDigit();
|
|
//piCout << PIChar::fromUTF8("1").isDigit();
|
|
piCout << PIChar::fromUTF8("щ") << PIChar::fromUTF8("щ").isLower() << PIChar::fromUTF8("щ").isUpper();
|
|
piCout << PIChar::fromUTF8("Ц") << PIChar::fromUTF8("Ц").isLower() << PIChar::fromUTF8("Ц").isUpper();
|
|
|
|
//piCout << str;
|
|
//piCout << str.toLowerCase();
|
|
//piCout << str.toUpperCase();
|
|
/*str.forEach([](PIChar c){piCout << c; return c;});
|
|
PIFile f("1.txt", PIIODevice::ReadWrite);
|
|
f.clear();
|
|
f << str;
|
|
PIChar c = PIChar::fromUTF8("│");
|
|
PIString s = PIString::fromUTF8("│");
|
|
piCout << c.unicode16Code() << s[0].unicode16Code();
|
|
piCout << c << s << PISystemInfo::machineKey();
|
|
PIFile f("1.txt", PIIODevice::ReadWrite);
|
|
f.clear();
|
|
f << c;*/
|
|
|
|
//PIConfig conf("spec_core.conf", PIIODevice::ReadOnly);
|
|
//print(&conf.rootEntry());
|
|
return 0;
|
|
}
|