aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/lib/strings/str_util.h
diff options
context:
space:
mode:
authorGravatar akindyakov <akindyakov@gmail.com>2018-04-20 11:23:15 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-04-20 11:25:53 -0700
commit570d90b9c7e6a19bc2606fdaf7ad0f85b8590c0e (patch)
treeae3617cdb70686297ddf6bab05d99fd44bb64224 /tensorflow/core/lib/strings/str_util.h
parent49f3469d9533cb12d06ed3907b4ced975e2fcea4 (diff)
Speed up safe_strtod and safe_strtof functions by using double-conversion library
Closes #12102. PiperOrigin-RevId: 193696537
Diffstat (limited to 'tensorflow/core/lib/strings/str_util.h')
-rw-r--r--tensorflow/core/lib/strings/str_util.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/core/lib/strings/str_util.h b/tensorflow/core/lib/strings/str_util.h
index 065871c1b4..e97d00b975 100644
--- a/tensorflow/core/lib/strings/str_util.h
+++ b/tensorflow/core/lib/strings/str_util.h
@@ -223,6 +223,11 @@ std::vector<string> Split(StringPiece text, char delims, Predicate p) {
return Split(text, StringPiece(&delims, 1), p);
}
+// Returns the length of the given null-terminated byte string 'str'.
+// Returns 'string_max_len' if the null character was not found in the first
+// 'string_max_len' bytes of 'str'.
+size_t Strnlen(const char* str, const size_t string_max_len);
+
} // namespace str_util
} // namespace tensorflow