string ascii

This commit is contained in:
2022-04-24 19:15:51 +03:00
parent c1c324a5a8
commit cf48c9ebf7
2 changed files with 76 additions and 64 deletions

View File

@@ -290,13 +290,7 @@ PIString PIString::fromUTF8(const PIByteArray & ba) {
PIString PIString::fromAscii(const char * s) {
PIString ret;
int l = 0;
while (s[l] != '\0') {
ret.push_back(PIChar(s[l]));
++l;
}
return ret;
return fromAscii(s, strlen(s));
}