Grammalecte  Check-in [0d65245a99]

Overview
Comment:[core][js] extended JS types: add apostrophes for islower() and isupper() to have same behavior as Python
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | core
Files: files | file ages | folders
SHA3-256: 0d65245a998c43a6db0113c435ade5741584bcbb2ca2d8b56550c1e5e368484c
User & Date: olr on 2020-05-14 18:18:58
Other Links: manifest | tags
Context
2020-05-15
20:37
[fr] ajustements et faux positifs check-in: 7e8d38a146 user: olr tags: trunk, fr
2020-05-14
18:18
[core][js] extended JS types: add apostrophes for islower() and isupper() to have same behavior as Python check-in: 0d65245a99 user: olr tags: trunk, core
18:12
[build][fr] don’t use list as parameter for define() check-in: d2825ab76b user: olr tags: trunk, fr, build
Changes

Modified js_extension/string.js from [642ec84082] to [d7879c84f4].

20
21
22
23
24
25
26
27

28
29
30

31
32
33
34
35
36
37
20
21
22
23
24
25
26

27
28
29

30
31
32
33
34
35
36
37







-
+


-
+







    String.prototype.gl_isDigit = function () {
        return (this.search(/^[0-9⁰¹²³⁴⁵⁶⁷⁸⁹]+$/) !== -1);
    };
    String.prototype.gl_isAlpha = function () {
        return (this.search(/^[a-zà-öA-Zø-ÿÀ-ÖØ-ßĀ-ʯff-stᴀ-ᶿ]+$/) !== -1);
    };
    String.prototype.gl_isLowerCase = function () {
        return (this.search(/^[a-zà-öø-ÿff-st0-9-]+$/) !== -1);
        return (this.search(/^[a-zà-öø-ÿff-st0-9'’-]+$/) !== -1);
    };
    String.prototype.gl_isUpperCase = function () {
        return (this.search(/^[A-ZÀ-ÖØ-ߌ0-9-]+$/) !== -1);
        return (this.search(/^[A-ZÀ-ÖØ-ߌ0-9'’-]+$/) !== -1);
    };
    String.prototype.gl_isTitle = function () {
        return (this.search(/^[A-ZÀ-ÖØ-ߌ][a-zà-öø-ÿff-st'’-]+$/) !== -1);
    };
    String.prototype.gl_toCapitalize = function () {
        return this.slice(0,1).toUpperCase() + this.slice(1).toLowerCase();
    };