Delete rtc::string_trim. Replaced with absl::StripAsciiWhitespace.
Bug: webrtc:6424, webrtc:13579 Change-Id: I222e1bfb62d5f1f1a2c74e5fce1038e04e7bebfb Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/255824 Reviewed-by: Ali Tofigh <alito@webrtc.org> Reviewed-by: Tomas Gunnarsson <tommi@webrtc.org> Commit-Queue: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/main@{#36234}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
c367346a75
commit
658b88a48e
@ -30,19 +30,6 @@ size_t strcpyn(char* buffer,
|
||||
return srclen;
|
||||
}
|
||||
|
||||
static const char kWhitespace[] = " \n\r\t";
|
||||
|
||||
std::string string_trim(const std::string& s) {
|
||||
std::string::size_type first = s.find_first_not_of(kWhitespace);
|
||||
std::string::size_type last = s.find_last_not_of(kWhitespace);
|
||||
|
||||
if (first == std::string::npos || last == std::string::npos) {
|
||||
return std::string("");
|
||||
}
|
||||
|
||||
return s.substr(first, last - first + 1);
|
||||
}
|
||||
|
||||
std::string ToHex(const int i) {
|
||||
char buffer[50];
|
||||
snprintf(buffer, sizeof(buffer), "%x", i);
|
||||
|
||||
Reference in New Issue
Block a user