# ee.String.length

Returns the length of a string.

<br />

| Usage | Returns |
|---|---|
| `String.length()` | Integer |

| Argument | Type | Details |
|---|---|---|
| this: `string` | String | The string from which to get the length. |

## Examples

### Code Editor (JavaScript)

```javascript
print(ee.String('').length());  // 0
print(ee.String('abc123').length());  // 6
```
Python setup

See the [Python Environment](https://developers.google.com/earth-engine/guides/python_install) page for information on the Python API and using
`geemap` for interactive development.

```python
import ee
import geemap.core as geemap
```

### Colab (Python)

```python
display(ee.String('').length())  # 0
display(ee.String('abc123').length())  # 6
```