aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/lib/strings/str_util.h
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-05-02 11:45:15 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-05-02 11:48:03 -0700
commit1ea4a77c6ccd2c783aedb2ccaf76f46b018c12c5 (patch)
tree933fc3ff71c8393b5254c33f6efedb28d2ccc67d /tensorflow/core/lib/strings/str_util.h
parent9b6cba1d739e36ec2da59a593afb09bf17307650 (diff)
Replaced calls to tensorflow::StringPiece::ToString with std::string conversions.
That is, instances of sp.ToString() are replaced with std::string(sp). This will allow tensorflow::StringPiece::ToString to be removed, which is necessary before it can be replaced with absl::string_view. PiperOrigin-RevId: 195126422
Diffstat (limited to 'tensorflow/core/lib/strings/str_util.h')
-rw-r--r--tensorflow/core/lib/strings/str_util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/core/lib/strings/str_util.h b/tensorflow/core/lib/strings/str_util.h
index e97d00b975..c887db7eff 100644
--- a/tensorflow/core/lib/strings/str_util.h
+++ b/tensorflow/core/lib/strings/str_util.h
@@ -205,7 +205,7 @@ std::vector<string> Split(StringPiece text, StringPiece delims, Predicate p) {
if ((i == text.size()) || (delims.find(text[i]) != StringPiece::npos)) {
StringPiece token(text.data() + token_start, i - token_start);
if (p(token)) {
- result.push_back(token.ToString());
+ result.push_back(std::string(token));
}
token_start = i + 1;
}