Skip to content

Commit c2abdfc

Browse files
committed
String
1 parent d501423 commit c2abdfc

File tree

3 files changed

+34
-30
lines changed

3 files changed

+34
-30
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -335,17 +335,17 @@ String
335335

336336
### Property Methods
337337
```text
338-
+---------------+----------+----------+----------+----------+----------+----------+
339-
| | [\t\n\r] | [ !#$%…] | [A-Za-z] | [¼½¾…] | [¹²³…] | [0-9] |
340-
+---------------+----------+----------+----------+----------+----------+----------+
341-
| isprintable() | | yes | yes | yes | yes | yes |
342-
| isalnum() | | | yes | yes | yes | yes |
343-
| isnumeric() | | | | yes | yes | yes |
344-
| isdigit() | | | | | yes | yes |
345-
| isdecimal() | | | | | | yes |
346-
+---------------+----------+----------+----------+----------+----------+----------+
347-
```
348-
338+
+---------------+----------+----------+----------+----------+----------+
339+
| | [ !#$%…] | [a-zA-Z] | [¼½¾…] | [¹²³…] | [0-9] |
340+
+---------------+----------+----------+----------+----------+----------+
341+
| isprintable() | yes | yes | yes | yes | yes |
342+
| isalnum() | | yes | yes | yes | yes |
343+
| isnumeric() | | | yes | yes | yes |
344+
| isdigit() | | | | yes | yes |
345+
| isdecimal() | | | | | yes |
346+
+---------------+----------+----------+----------+----------+----------+
347+
```
348+
* **Also: `'isspace()'` checks for `'[ \t\n\r…]'`.**
349349

350350
Regex
351351
-----

index.html

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -443,17 +443,20 @@
443443
<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>
444444
<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>
445445
</ul>
446-
<div><h3 id="propertymethods">Property Methods</h3><pre><code class="text language-text">+---------------+----------+----------+----------+----------+----------+----------+
447-
| | [\t\n\r] | [ !#$%…] | [A-Za-z] | [¼½¾…] | [¹²³…] | [0-9] |
448-
+---------------+----------+----------+----------+----------+----------+----------+
449-
| isprintable() | | yes | yes | yes | yes | yes |
450-
| isalnum() | | | yes | yes | yes | yes |
451-
| isnumeric() | | | | yes | yes | yes |
452-
| isdigit() | | | | | yes | yes |
453-
| isdecimal() | | | | | | yes |
454-
+---------------+----------+----------+----------+----------+----------+----------+
446+
<div><h3 id="propertymethods">Property Methods</h3><pre><code class="text language-text">+---------------+----------+----------+----------+----------+----------+
447+
| | [ !#$%…] | [a-zA-Z] | [¼½¾…] | [¹²³…] | [0-9] |
448+
+---------------+----------+----------+----------+----------+----------+
449+
| isprintable() | yes | yes | yes | yes | yes |
450+
| isalnum() | | yes | yes | yes | yes |
451+
| isnumeric() | | | yes | yes | yes |
452+
| isdigit() | | | | yes | yes |
453+
| isdecimal() | | | | | yes |
454+
+---------------+----------+----------+----------+----------+----------+
455455
</code></pre></div>
456456

457+
<ul>
458+
<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…]'</span></code>.</strong></li>
459+
</ul>
457460
<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
458461
&lt;str&gt; = re.sub(&lt;regex&gt;, new, text, count=<span class="hljs-number">0</span>) <span class="hljs-comment"># Substitutes all occurrences.</span>
459462
&lt;list&gt; = re.findall(&lt;regex&gt;, text) <span class="hljs-comment"># Returns all occurrences.</span>

web/script_2.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -206,18 +206,19 @@ const DIAGRAM_11_B =
206206
'┗━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━━━━┛\n';
207207

208208
const DIAGRAM_12_A =
209-
'+---------------+----------+----------+----------+----------+----------+----------+\n';
209+
'+---------------+----------+----------+----------+----------+----------+\n';
210210

211211
const DIAGRAM_12_B =
212-
'┏━━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┓\n' +
213-
'┃ │ [\\t\\n\\r] │ [ !#$%…] │ [A-Za-z] │ [¼½¾…] │ [¹²³…] │ [0-9] ┃\n' +
214-
'┠───────────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┨\n' +
215-
'┃ isprintable() │ │ ✓ │ ✓ │ ✓ │ ✓ │ ✓ ┃\n' +
216-
'┃ isalnum() │ │ │ ✓ │ ✓ │ ✓ │ ✓ ┃\n' +
217-
'┃ isnumeric() │ │ │ │ ✓ │ ✓ │ ✓ ┃\n' +
218-
'┃ isdigit() │ │ │ │ │ ✓ │ ✓ ┃\n' +
219-
'┃ isdecimal() │ │ │ │ │ │ ✓ ┃\n' +
220-
'┗━━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┛\n';
212+
'┏━━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┓\n' +
213+
'┃ │ [ !#$%…] │ [a-zA-Z] │ [¼½¾…] │ [¹²³…] │ [0-9] ┃\n' +
214+
'┠───────────────┼──────────┼──────────┼──────────┼──────────┼──────────┨\n' +
215+
'┃ isprintable() │ ✓ │ ✓ │ ✓ │ ✓ │ ✓ ┃\n' +
216+
'┃ isalnum() │ │ ✓ │ ✓ │ ✓ │ ✓ ┃\n' +
217+
'┃ isnumeric() │ │ │ ✓ │ ✓ │ ✓ ┃\n' +
218+
'┃ isdigit() │ │ │ │ ✓ │ ✓ ┃\n' +
219+
'┃ isdecimal() │ │ │ │ │ ✓ ┃\n' +
220+
'┗━━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┛\n';
221+
221222

222223
// isFontAvailable:
223224
(function(d){function c(c){b.style.fontFamily=c;e.appendChild(b);f=b.clientWidth;e.removeChild(b);return f}var f,e=d.body,b=d.createElement("span");b.innerHTML=Array(100).join("wi");b.style.cssText=["position:absolute","width:auto","font-size:128px","left:-99999px"].join(" !important;");var g=c("monospace"),h=c("serif"),k=c("sans-serif");window.isFontAvailable=function(b){return g!==c(b+",monospace")||k!==c(b+",sans-serif")||h!==c(b+",serif")}})(document);

0 commit comments

Comments
 (0)