This commit is contained in:
blueloveTH 2023-06-27 02:36:42 +08:00
parent a24202989c
commit 53c84abe56

View File

@ -201,6 +201,12 @@ struct Str{
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 {
return std::string_view(data, size);
}