Add string_strip to remove leading and trailing whitespaces (#18418)
* Add string_strip to remove leading and trailing whitespaces
This fix tries to address the issue raised in 18384 to add
an op tf.string_strip so that the leading and trailing whitespaces
could be removed.
This fix fixes 18384.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add StringStrip op to string_ops.cc
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update Bazel BUILD file
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Sanitize with clang-format
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Add test cases for string_strip
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix pylint issue
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update API defs with tensorflow/core/api_def/update_api_def.sh
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Fix python test error
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
* Update goldens API with
```
bazel-bin/tensorflow/tools/api/tests/api_compatibility_test
--update_goldens True
```
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>