utils: trim(): Take string_view
This commit is contained in:
부모
86ac86b83f
커밋
9593429f95
@ -182,10 +182,9 @@ std::string utils::toISODate(time_t t)
|
||||
return std::string{result};
|
||||
}
|
||||
|
||||
std::string utils::trim(const std::string &str)
|
||||
std::string utils::trim(std::string_view view)
|
||||
{
|
||||
std::string_view chars = " \t\n\r";
|
||||
std::string_view view = str;
|
||||
auto n = view.find_first_not_of(chars);
|
||||
if(n != std::string_view::npos)
|
||||
{
|
||||
|
불러오는 중...
Reference in New Issue
Block a user