# otp.Operation.str.len

#### \_StrAccessor.len()

Get the length of a string.

* **Returns:**
  The length of the string.
  If a null-character (byte with value `0`) is present in the string,
  its position (0-based) is returned.
* **Return type:**
  [Operation](https://docs.pip.distribution.sol.onetick.com/api/operation/root.html.md#onetick.py.Operation)

### Examples

```pycon
>>> data = otp.Ticks(X=['hello', 'world!'])
>>> data['LEN'] = data['X'].str.len()
>>> otp.run(data)
                     Time       X  LEN
0 2003-12-01 00:00:00.000   hello    5
1 2003-12-01 00:00:00.001  world!    6
```
