Commit 075fbb59 authored by Yong Tang's avatar Yong Tang Committed by Derek Murray
Browse files

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: default avatarYong Tang <yong.tang.github@outlook.com>

* Add StringStrip op to string_ops.cc

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Update Bazel BUILD file

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Sanitize with clang-format

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Add test cases for string_strip

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Fix pylint issue

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Update API defs with tensorflow/core/api_def/update_api_def.sh

Signed-off-by: default avatarYong Tang <yong.tang.github@outlook.com>

* Fix python test error

Signed-off-by: default avatarYong 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: default avatarYong Tang <yong.tang.github@outlook.com>
parent 6e87115a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment