Browse Source

Format

pull/3/head
Jure Šorn 5 years ago
parent
commit
0e9c72f8e2
1 changed files with 10 additions and 7 deletions
  1. 17
      README.md

17
README.md

@ -197,15 +197,18 @@ is_function = callable(<el>)
String
------
```python
<str> = <str>.replace(old_str, new_str)
<list> = <str>.split(sep=None, maxsplit=-1) # Splits on whitespaces by default.
<str> = <str>.strip('<chars>')
<list> = <str>.split(sep=None, maxsplit=-1) # Splits on any whitespace char by default.
<str> = <str>.join(<list>)
<bool> = <str>.startswith(<str>) # Pass tuple of strings for multiple options.
<bool> = <str>.endswith(<str>) # Pass tuple of strings for multiple options.
<bool> = <str>.isnumeric() # True if str contains only numeric characters.
<int> = <str>.index(<sub_str>) # Returns first index of substring.
<list> = textwrap.wrap(text, width) # Nicely breakes text into lines.
<str> = <str>.replace(old_str, new_str)
```
```python
<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