diff --git a/README.md b/README.md index bc2be9c..f867562 100644 --- a/README.md +++ b/README.md @@ -335,17 +335,17 @@ String ### Property Methods ```text -+---------------+----------+----------+----------+----------+----------+----------+ -| | [\t\n\r] | [ !#$%…] | [A-Za-z] | [¼½¾…] | [¹²³…] | [0-9] | -+---------------+----------+----------+----------+----------+----------+----------+ -| isprintable() | | yes | yes | yes | yes | yes | -| isalnum() | | | yes | yes | yes | yes | -| isnumeric() | | | | yes | yes | yes | -| isdigit() | | | | | yes | yes | -| isdecimal() | | | | | | yes | -+---------------+----------+----------+----------+----------+----------+----------+ -``` - ++---------------+----------+----------+----------+----------+----------+ +| | [ !#$%…] | [a-zA-Z] | [¼½¾…] | [¹²³…] | [0-9] | ++---------------+----------+----------+----------+----------+----------+ +| isprintable() | yes | yes | yes | yes | yes | +| isalnum() | | yes | yes | yes | yes | +| isnumeric() | | | yes | yes | yes | +| isdigit() | | | | yes | yes | +| isdecimal() | | | | | yes | ++---------------+----------+----------+----------+----------+----------+ +``` +* **Also: `'isspace()'` checks for `'[ \t\n\r…]'`.** Regex ----- diff --git a/index.html b/index.html index 10974e8..142e8df 100644 --- a/index.html +++ b/index.html @@ -443,17 +443,20 @@ to_exclusive = <range>.stop
  • Also: 'lstrip()', 'rstrip()'.
  • Also: 'lower()', 'upper()', 'capitalize()' and 'title()'.
  • -

    Property Methods

    +---------------+----------+----------+----------+----------+----------+----------+
    -|               | [\t\n\r] | [ !#$%…] | [A-Za-z] |  [¼½¾…]  |  [¹²³…]  |  [0-9]   |
    -+---------------+----------+----------+----------+----------+----------+----------+
    -| isprintable() |          |   yes    |   yes    |   yes    |   yes    |   yes    |
    -| isalnum()     |          |          |   yes    |   yes    |   yes    |   yes    |
    -| isnumeric()   |          |          |          |   yes    |   yes    |   yes    |
    -| isdigit()     |          |          |          |          |   yes    |   yes    |
    -| isdecimal()   |          |          |          |          |          |   yes    |
    -+---------------+----------+----------+----------+----------+----------+----------+
    +

    Property Methods

    +---------------+----------+----------+----------+----------+----------+
    +|               | [ !#$%…] | [a-zA-Z] |  [¼½¾…]  |  [¹²³…]  |  [0-9]   |
    ++---------------+----------+----------+----------+----------+----------+
    +| isprintable() |   yes    |   yes    |   yes    |   yes    |   yes    |
    +| isalnum()     |          |   yes    |   yes    |   yes    |   yes    |
    +| isnumeric()   |          |          |   yes    |   yes    |   yes    |
    +| isdigit()     |          |          |          |   yes    |   yes    |
    +| isdecimal()   |          |          |          |          |   yes    |
    ++---------------+----------+----------+----------+----------+----------+
     
    +
      +
    • Also: 'isspace()' checks for '[ \t\n\r…]'.
    • +

    #Regex

    import re
     <str>   = re.sub(<regex>, new, text, count=0)  # Substitutes all occurrences.
     <list>  = re.findall(<regex>, text)            # Returns all occurrences.
    diff --git a/web/script_2.js b/web/script_2.js
    index 2ba5309..a59bb22 100644
    --- a/web/script_2.js
    +++ b/web/script_2.js
    @@ -206,18 +206,19 @@ const DIAGRAM_11_B =
       '┗━━━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━┷━━━━━━━━━━━━━┛\n';
     
     const DIAGRAM_12_A =
    -  '+---------------+----------+----------+----------+----------+----------+----------+\n';
    +  '+---------------+----------+----------+----------+----------+----------+\n';
     
     const DIAGRAM_12_B =
    -  '┏━━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┓\n' +
    -  '┃               │ [\\t\\n\\r] │ [ !#$%…] │ [A-Za-z] │  [¼½¾…]  │  [¹²³…]  │  [0-9]   ┃\n' +
    -  '┠───────────────┼──────────┼──────────┼──────────┼──────────┼──────────┼──────────┨\n' +
    -  '┃ isprintable() │          │    ✓     │    ✓     │    ✓     │    ✓     │    ✓     ┃\n' +
    -  '┃ isalnum()     │          │          │    ✓     │    ✓     │    ✓     │    ✓     ┃\n' +
    -  '┃ isnumeric()   │          │          │          │    ✓     │    ✓     │    ✓     ┃\n' +
    -  '┃ isdigit()     │          │          │          │          │    ✓     │    ✓     ┃\n' +
    -  '┃ isdecimal()   │          │          │          │          │          │    ✓     ┃\n' +
    -  '┗━━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┛\n';
    +  '┏━━━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┓\n' +
    +  '┃               │ [ !#$%…] │ [a-zA-Z] │  [¼½¾…]  │  [¹²³…]  │  [0-9]   ┃\n' +
    +  '┠───────────────┼──────────┼──────────┼──────────┼──────────┼──────────┨\n' +
    +  '┃ isprintable() │    ✓     │    ✓     │    ✓     │    ✓     │    ✓     ┃\n' +
    +  '┃ isalnum()     │          │    ✓     │    ✓     │    ✓     │    ✓     ┃\n' +
    +  '┃ isnumeric()   │          │          │    ✓     │    ✓     │    ✓     ┃\n' +
    +  '┃ isdigit()     │          │          │          │    ✓     │    ✓     ┃\n' +
    +  '┃ isdecimal()   │          │          │          │          │    ✓     ┃\n' +
    +  '┗━━━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┛\n';
    +
     
     // isFontAvailable:
     (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);