@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Returns the length of a string in bytes.
|
Returns the length of a string in bytes.
|
||||||
|
|
||||||
`utf-8` encodes a given string and find its length.
|
`utf-8` encodes a given string, then `len` finds the length of the encoded string.
|
||||||
|
|
||||||
```python
|
```python
|
||||||
def byte_size(string):
|
def byte_size(string):
|
||||||
|
|||||||
Reference in New Issue
Block a user