diff --git a/README.md b/README.md index e4316ff..abb9364 100644 --- a/README.md +++ b/README.md @@ -308,7 +308,7 @@ String ```python <list> = <str>.split() # Splits on one or more whitespace characters. <list> = <str>.split(sep=None, maxsplit=-1) # Splits on 'sep' str at most 'maxsplit' times. -<list> = <str>.splitlines(keepends=False) # Splits on [\n\r\f\v\x1c\x1d\x1e\x85…] and \r\n. +<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 using string as a separator. ``` @@ -329,7 +329,7 @@ String <str> = chr(<int>) # Converts int to Unicode char. <int> = ord(<str>) # Converts Unicode char to int. ``` -* **Also: `'lstrip()'`, `'rstrip()'`.** +* **Also: `'lstrip()'`, `'rstrip()'` and `'rsplit()'`.** * **Also: `'lower()'`, `'upper()'`, `'capitalize()'` and `'title()'`.** ### Property Methods @@ -344,7 +344,7 @@ String | isdecimal() | | | | | yes | +---------------+----------+----------+----------+----------+----------+ ``` -* **Also: `'isspace()'` checks for `'[ \t\n\r\f\v…]'`.** +* **Also: `'isspace()'` checks for `'[ \t\n\r\f\v\x1c-\x1f\x85…]'`.** Regex @@ -377,7 +377,7 @@ import re ### Special Sequences * **By default, decimal characters, alphanumerics and whitespaces from all alphabets are matched unless `'flags=re.ASCII'` argument is used.** -* **As shown below, it restricts special sequence matches to the first 128 characters and prevents `'\s'` from accepting `'[\x1c-\x1f]'`.** +* **As shown below, it restricts special sequence matches to the first 128 characters and prevents `'\s'` from accepting `'[\x1c-\x1f]'` (the so-called separator characters).** * **Use a capital letter for negation.** ```python '\d' == '[0-9]' # Matches decimal characters. diff --git a/index.html b/index.html index ce130e4..e1da59e 100644 --- a/index.html +++ b/index.html @@ -449,7 +449,7 @@ to_exclusive = <range>.stop <pre><code class="python language-python hljs"><list> = <str>.split() <span class="hljs-comment"># Splits on one or more whitespace characters.</span> <list> = <str>.split(sep=<span class="hljs-keyword">None</span>, maxsplit=<span class="hljs-number">-1</span>) <span class="hljs-comment"># Splits on 'sep' str at most 'maxsplit' times.</span> -<list> = <str>.splitlines(keepends=<span class="hljs-keyword">False</span>) <span class="hljs-comment"># Splits on [\n\r\f\v\x1c\x1d\x1e\x85…] and \r\n.</span> +<list> = <str>.splitlines(keepends=<span class="hljs-keyword">False</span>) <span class="hljs-comment"># On [\n\r\f\v\x1c-\x1e\x85\u2028\u2029] and \r\n.</span> <str> = <str>.join(<coll_of_strings>) <span class="hljs-comment"># Joins elements using string as a separator.</span> </code></pre> <pre><code class="python language-python hljs"><bool> = <sub_str> <span class="hljs-keyword">in</span> <str> <span class="hljs-comment"># Checks if string contains a substring.</span> @@ -465,7 +465,7 @@ to_exclusive = <range>.stop <int> = ord(<str>) <span class="hljs-comment"># Converts Unicode char to int.</span> </code></pre> <ul> -<li><strong>Also: <code class="python hljs"><span class="hljs-string">'lstrip()'</span></code>, <code class="python hljs"><span class="hljs-string">'rstrip()'</span></code>.</strong></li> +<li><strong>Also: <code class="python hljs"><span class="hljs-string">'lstrip()'</span></code>, <code class="python hljs"><span class="hljs-string">'rstrip()'</span></code> and <code class="python hljs"><span class="hljs-string">'rsplit()'</span></code>.</strong></li> <li><strong>Also: <code class="python hljs"><span class="hljs-string">'lower()'</span></code>, <code class="python hljs"><span class="hljs-string">'upper()'</span></code>, <code class="python hljs"><span class="hljs-string">'capitalize()'</span></code> and <code class="python hljs"><span class="hljs-string">'title()'</span></code>.</strong></li> </ul> <div><h3 id="propertymethods">Property Methods</h3><pre><code class="text language-text">┏━━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┓ @@ -480,7 +480,7 @@ to_exclusive = <range>.stop </code></pre></div> <ul> -<li><strong>Also: <code class="python hljs"><span class="hljs-string">'isspace()'</span></code> checks for <code class="python hljs"><span class="hljs-string">'[ \t\n\r\f\v…]'</span></code>.</strong></li> +<li><strong>Also: <code class="python hljs"><span class="hljs-string">'isspace()'</span></code> checks for <code class="python hljs"><span class="hljs-string">'[ \t\n\r\f\v\x1c-\x1f\x85…]'</span></code>.</strong></li> </ul> <div><h2 id="regex"><a href="#regex" name="regex">#</a>Regex</h2><pre><code class="python language-python hljs"><span class="hljs-keyword">import</span> re <str> = re.sub(<regex>, new, text, count=<span class="hljs-number">0</span>) <span class="hljs-comment"># Substitutes all occurrences with 'new'.</span> @@ -508,7 +508,7 @@ to_exclusive = <range>.stop <div><h3 id="specialsequences">Special Sequences</h3><ul> <li><strong>By default, decimal characters, alphanumerics and whitespaces from all alphabets are matched unless <code class="python hljs"><span class="hljs-string">'flags=re.ASCII'</span></code> argument is used.</strong></li> -<li><strong>As shown below, it restricts special sequence matches to the first 128 characters and prevents <code class="python hljs"><span class="hljs-string">'\s'</span></code> from accepting <code class="python hljs"><span class="hljs-string">'[\x1c-\x1f]'</span></code>.</strong></li> +<li><strong>As shown below, it restricts special sequence matches to the first 128 characters and prevents <code class="python hljs"><span class="hljs-string">'\s'</span></code> from accepting <code class="python hljs"><span class="hljs-string">'[\x1c-\x1f]'</span></code> (the so-called separator characters).</strong></li> <li><strong>Use a capital letter for negation.</strong></li> </ul><pre><code class="python language-python hljs"><span class="hljs-string">'\d'</span> == <span class="hljs-string">'[0-9]'</span> <span class="hljs-comment"># Matches decimal characters.</span> <span class="hljs-string">'\w'</span> == <span class="hljs-string">'[a-zA-Z0-9_]'</span> <span class="hljs-comment"># Matches alphanumerics and underscore.</span>