mirror of
https://github.com/pocketpy/pocketpy
synced 2025-12-07 10:40:16 +00:00
...
This commit is contained in:
parent
a24202989c
commit
53c84abe56
@ -201,6 +201,12 @@ struct Str{
|
|||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const char* c_str_temp() const {
|
||||||
|
static THREAD_LOCAL std::string temp;
|
||||||
|
temp.assign(data, size);
|
||||||
|
return temp.c_str();
|
||||||
|
}
|
||||||
|
|
||||||
std::string_view sv() const {
|
std::string_view sv() const {
|
||||||
return std::string_view(data, size);
|
return std::string_view(data, size);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user