PIString::fromAscii() new overload
This commit is contained in:
@@ -333,11 +333,14 @@ PIString PIString::fromAscii(const char * s) {
|
||||
ret.push_back(PIChar(s[l]));
|
||||
++l;
|
||||
}
|
||||
/*while (s[l] != '\0') ++l;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
PIString PIString::fromAscii(const char * s, int len) {
|
||||
PIString ret;
|
||||
ret.resize(l);
|
||||
for (int i = 0; i < l; ++i)
|
||||
ret[i] = s[i];*/
|
||||
for (int l = 0; l < len; ++l)
|
||||
ret.push_back(PIChar(s[l]));
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -722,6 +722,9 @@ public:
|
||||
//! \brief Return string constructed from ASCII
|
||||
static PIString fromAscii(const char * s);
|
||||
|
||||
//! \brief Return string constructed from "len" chars ASCII
|
||||
static PIString fromAscii(const char * s, int len);
|
||||
|
||||
//! \brief Return string constructed from "c" codepage
|
||||
static PIString fromCodepage(const char * s, const char * c);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user