Clean up leftover comments in str_util.
These were left over due to two separate cls touching this section of the code. PiperOrigin-RevId: 263012313
This commit is contained in:
parent
7efa358af3
commit
0157067029
@ -23,7 +23,6 @@ limitations under the License.
|
||||
#include "absl/strings/escaping.h"
|
||||
#include "absl/strings/match.h"
|
||||
#include "absl/strings/strip.h"
|
||||
#include "tensorflow/core/lib/strings/numbers.h"
|
||||
#include "tensorflow/core/lib/strings/stringprintf.h"
|
||||
#include "tensorflow/core/platform/logging.h"
|
||||
|
||||
@ -32,24 +31,6 @@ namespace str_util {
|
||||
|
||||
string CEscape(StringPiece src) { return absl::CEscape(src); }
|
||||
|
||||
namespace { // Private helpers for CUnescape().
|
||||
|
||||
template <typename T>
|
||||
bool SplitAndParseAsInts(StringPiece text, char delim,
|
||||
std::function<bool(StringPiece, T*)> converter,
|
||||
std::vector<T>* result) {
|
||||
result->clear();
|
||||
std::vector<string> num_strings = Split(text, delim);
|
||||
for (const auto& s : num_strings) {
|
||||
T num;
|
||||
if (!converter(s, &num)) return false;
|
||||
result->push_back(num);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
bool CUnescape(StringPiece source, string* dest, string* error) {
|
||||
return absl::CUnescape(source, dest, error);
|
||||
}
|
||||
|
||||
@ -147,10 +147,6 @@ template <typename Predicate>
|
||||
ABSL_DEPRECATED("Use absl::StrSplit instead.")
|
||||
std::vector<string> Split(StringPiece text, StringPiece delims, Predicate p);
|
||||
|
||||
// Split "text" at "delim" characters, and parse each component as
|
||||
// an integer. If successful, adds the individual numbers in order
|
||||
// to "*result" and returns true. Otherwise returns false.
|
||||
|
||||
// StartsWith()
|
||||
//
|
||||
// Returns whether a given string `text` begins with `prefix`.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user