Browse Source

Format

pull/3/head
Jure Šorn 5 years ago
parent
commit
3f9892fc99
1 changed files with 11 additions and 8 deletions
  1. 19
      README.md

19
README.md

@ -197,20 +197,23 @@ is_function = callable(<el>)
String
------
```python
<str> = <str>.strip() # Strips all whitespace characters.
<str> = <str>.strip('<chars>') # Strips all passed characters.
<str> = <str>.strip() # Strips all whitespace characters.
<str> = <str>.strip('<chars>') # Strips all passed characters.
```
```python
<list> = <str>.split() # Splits on any whitespace character.
<list> = <str>.split(sep=None, maxsplit=-1) # Splits on 'sep' at most 'maxsplit' times.
<str> = <str>.join(<list>) # Joins elements using <str> as separator.
```
```python
<str> = <str>.join(<list>)
<str> = <str>.replace(old_str, new_str)
<bool> = <str>.startswith(<sub_str>) # Pass tuple of strings for multiple options.
<bool> = <str>.endswith(<sub_str>) # Pass tuple of strings for multiple options.
<int> = <str>.index(<sub_str>) # Returns first index of a substring.
<bool> = <str>.isnumeric() # True if str contains only numeric characters.
<list> = textwrap.wrap(<str>, width) # Nicely breakes string into lines.
<bool> = <str>.startswith(<sub_str>) # Pass tuple of strings for multiple options.
<bool> = <str>.endswith(<sub_str>) # Pass tuple of strings for multiple options.
<int> = <str>.index(<sub_str>) # Returns first index of a substring.
<bool> = <str>.isnumeric() # True if str contains only numeric characters.
<list> = textwrap.wrap(<str>, width) # Nicely breakes string into lines.
```
### Char

Loading…
Cancel
Save