<str> = 'abc' # Also "abc". Interprets \n, \t, \x00-\xff, etc.
```
```python
<str> = <str>.strip() # Strips all whitespace characters from both ends.
@ -317,40 +320,39 @@ String
```
```python
<list> = <str>.split() # Splits on one or more whitespace characters.
<list> = <str>.split() # Splits it on one or more whitespace characters.
<list> = <str>.split(sep=None, maxsplit=-1) # Splits on 'sep' string at most 'maxsplit' times.
<list> = <str>.splitlines(keepends=False) # On [\n\r\f\v\x1c-\x1e\x85\u2028\u2029] and \r\n.
<str> = <str>.join(<coll_of_strings>) # Joins elements by using string as a separator.
<str> = <str>.join(<coll_of_strings>) # Joins items by using the string as a separator.
```
```python
<bool> = <sub_str> in <str> # Checks if string contains the substring.
<bool> = <str>.startswith(<sub_str>) # Pass tuple of strings for multiple options.
<bool> = <sub_str> in <str> # Returns True if string contains the substring.
<bool> = <str>.startswith(<sub_str>) # Pass tuple of strings to give multiple options.
<int> = <str>.find(<sub_str>) # Returns start index of the first match or -1.
```
```python
<str> = <str>.lower() # Lowers the case. Also upper/capitalize/title().
<str> = <str>.casefold() # Same, but converts ẞ/ß to ss, Σ/ς to σ, etc.
<str> = <str>.casefold() # Lower() that converts ẞ/ß to ss, Σ/ς to σ, etc.
<str> = <str>.replace(old, new [, count]) # Replaces 'old' with 'new' at most 'count' times.
<str> = <str>.translate(<table>) # Use `str.maketrans(<dict>)` to generate table.
```
```python
<str> = chr(<int>) # Converts passed integer to Unicode character.
<int> = ord(<str>) # Converts passed Unicode character to integer.
<str> = chr(<int>) # Converts passed integer into Unicode character.
<int> = ord(<str>) # Converts passed Unicode character into integer.
```
* **Use `'unicodedata.normalize("NFC", <str>)'` on strings like `'Motörhead'` before comparing them to other strings, because `'ö'` can be stored as one or two characters.**
* **`'NFC'` converts such characters to a single character, while `'NFD'` converts them to two.**
### Property Methods
```python
<bool> = <str>.isdecimal() # Checks for [0-9]. Also [०-९] and [٠-٩].
<bool> = <str>.isdigit() # Checks for [²³¹…] and isdecimal().
<bool> = <str>.isnumeric() # Checks for [¼½¾…], [零〇一…] and isdigit().
<bool> = <str>.isalnum() # Checks for [a-zA-Z…] and isnumeric().
<bool> = <str>.isprintable() # Checks for [ !#$%…] and isalnum().
<bool> = <str>.isspace() # Checks for [ \t\n\r\f\v\x1c-\x1f\x85…].
<bool> = <str>.isdecimal() # Checks all chars for [0-9]. Also [०-९], [٠-٩].
<bool> = <str>.isdigit() # Checks for [²³¹…] and isdecimal(). Also [፩-፱].
<bool> = <str>.isnumeric() # Checks for [¼½¾…] and isdigit(). Also [零〇一…].
<bool> = <str>.isalnum() # Checks for [ABC…] and isnumeric(). Also [ªµº…].
<bool> = <str>.isprintable() # Checks for [ !"#$…] and isalnum(). Also emojis.
<bool> = <str>.isspace() # Checks for [ \t\n\r\f\v\x1c\x1d\x1e\x1f\x85…].
<div><h2id="string"><ahref="#string"name="string">#</a>String</h2><p><strong>Immutable sequence of characters.</strong></p><pre><codeclass="python language-python hljs"><str> = <str>.strip() <spanclass="hljs-comment"># Strips all whitespace characters from both ends.</span>
<str> = <str>.strip(<spanclass="hljs-string">'<chars>'</span>) <spanclass="hljs-comment"># Strips passed characters. Also lstrip/rstrip().</span>
<div><h2id="string"><ahref="#string"name="string">#</a>String</h2><p><strong>Immutable sequence of characters.</strong></p><pre><codeclass="python language-python hljs"><str> = <spanclass="hljs-string">'abc'</span><spanclass="hljs-comment"># Also "abc". Interprets \n, \t, \x00-\xff, etc.</span>
</code></pre></div>
<pre><codeclass="python language-python hljs"><list> = <str>.split() <spanclass="hljs-comment"># Splits on one or more whitespace characters.</span>
<pre><codeclass="python language-python hljs"><str> = <str>.strip() <spanclass="hljs-comment"># Strips all whitespace characters from both ends.</span>
<str> = <str>.strip(<spanclass="hljs-string">'<chars>'</span>) <spanclass="hljs-comment"># Strips passed characters. Also lstrip/rstrip().</span>
</code></pre>
<pre><codeclass="python language-python hljs"><list> = <str>.split() <spanclass="hljs-comment"># Splits it on one or more whitespace characters.</span>
<list> = <str>.split(sep=<spanclass="hljs-keyword">None</span>, maxsplit=<spanclass="hljs-number">-1</span>) <spanclass="hljs-comment"># Splits on 'sep' string at most 'maxsplit' times.</span>
<list> = <str>.splitlines(keepends=<spanclass="hljs-keyword">False</span>) <spanclass="hljs-comment"># On [\n\r\f\v\x1c-\x1e\x85\u2028\u2029] and \r\n.</span>
<str> = <str>.join(<coll_of_strings>) <spanclass="hljs-comment"># Joins elements by using string as a separator.</span>
<str> = <str>.join(<coll_of_strings>) <spanclass="hljs-comment"># Joins items by using the string as a separator.</span>
</code></pre>
<pre><codeclass="python language-python hljs"><bool> = <sub_str><spanclass="hljs-keyword">in</span><str><spanclass="hljs-comment"># Checks if string contains the substring.</span>
<bool> = <str>.startswith(<sub_str>) <spanclass="hljs-comment"># Pass tuple of strings for multiple options.</span>
<pre><codeclass="python language-python hljs"><bool> = <sub_str><spanclass="hljs-keyword">in</span><str><spanclass="hljs-comment"># Returns True if string contains the substring.</span>
<bool> = <str>.startswith(<sub_str>) <spanclass="hljs-comment"># Pass tuple of strings to give multiple options.</span>
<int> = <str>.find(<sub_str>) <spanclass="hljs-comment"># Returns start index of the first match or -1.</span>
</code></pre>
<pre><codeclass="python language-python hljs"><str> = <str>.lower() <spanclass="hljs-comment"># Lowers the case. Also upper/capitalize/title().</span>
<str> = <str>.casefold() <spanclass="hljs-comment"># Same, but converts ẞ/ß to ss, Σ/ς to σ, etc.</span>
<str> = <str>.casefold() <spanclass="hljs-comment"># Lower() that converts ẞ/ß to ss, Σ/ς to σ, etc.</span>
<str> = <str>.replace(old, new [, count]) <spanclass="hljs-comment"># Replaces 'old' with 'new' at most 'count' times.</span>
<str> = <str>.translate(<table>) <spanclass="hljs-comment"># Use `str.maketrans(<dict>)` to generate table.</span>
<int> = ord(<str>) <spanclass="hljs-comment"># Converts passed Unicode character into integer.</span>
</code></pre>
<ul>
<li><strong>Use <codeclass="python hljs"><spanclass="hljs-string">'unicodedata.normalize("NFC", <str>)'</span></code> on strings like <codeclass="python hljs"><spanclass="hljs-string">'Motörhead'</span></code> before comparing them to other strings, because <codeclass="python hljs"><spanclass="hljs-string">'ö'</span></code> can be stored as one or two characters.</strong></li>
<li><strong><codeclass="python hljs"><spanclass="hljs-string">'NFC'</span></code> converts such characters to a single character, while <codeclass="python hljs"><spanclass="hljs-string">'NFD'</span></code> converts them to two.</strong></li>
</ul>
<div><h3id="propertymethods">Property Methods</h3><pre><codeclass="python language-python hljs"><bool> = <str>.isdecimal() <spanclass="hljs-comment"># Checks for [0-9]. Also [०-९] and [٠-٩].</span>
<bool> = <str>.isdigit() <spanclass="hljs-comment"># Checks for [²³¹…] and isdecimal().</span>
<bool> = <str>.isnumeric() <spanclass="hljs-comment"># Checks for [¼½¾…], [零〇一…] and isdigit().</span>
<bool> = <str>.isalnum() <spanclass="hljs-comment"># Checks for [a-zA-Z…] and isnumeric().</span>
<bool> = <str>.isprintable() <spanclass="hljs-comment"># Checks for [ !#$%…] and isalnum().</span>
<bool> = <str>.isspace() <spanclass="hljs-comment"># Checks for [ \t\n\r\f\v\x1c-\x1f\x85…].</span>
</code></pre></div>
<pre><codeclass="python language-python hljs"><bool> = <str>.isdecimal() <spanclass="hljs-comment"># Checks all chars for [0-9]. Also [०-९], [٠-٩].</span>
<bool> = <str>.isdigit() <spanclass="hljs-comment"># Checks for [²³¹…] and isdecimal(). Also [፩-፱].</span>
<bool> = <str>.isnumeric() <spanclass="hljs-comment"># Checks for [¼½¾…] and isdigit(). Also [零〇一…].</span>
<bool> = <str>.isalnum() <spanclass="hljs-comment"># Checks for [ABC…] and isnumeric(). Also [ªµº…].</span>
<bool> = <str>.isprintable() <spanclass="hljs-comment"># Checks for [ !"#$…] and isalnum(). Also emojis.</span>
<bool> = <str>.isspace() <spanclass="hljs-comment"># Checks for [ \t\n\r\f\v\x1c\x1d\x1e\x1f\x85…].</span>
</code></pre>
<div><h2id="regex"><ahref="#regex"name="regex">#</a>Regex</h2><p><strong>Functions for regular expression matching.</strong></p><pre><codeclass="python language-python hljs"><spanclass="hljs-keyword">import</span> re
<str> = re.sub(<spanclass="hljs-string">r'<regex>'</span>, new, text, count=<spanclass="hljs-number">0</span>) <spanclass="hljs-comment"># Substitutes all occurrences with 'new'.</span>
<list> = re.findall(<spanclass="hljs-string">r'<regex>'</span>, text) <spanclass="hljs-comment"># Returns all occurrences of the pattern.</span>
@ -2933,7 +2934,7 @@ $ deactivate <span class="hljs-comment"># Deactivates the active