Grammalecte  Check-in [0d65245a99]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

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 2020-05-14 18:18:58
Context
2020-05-15
20:37
[fr] ajustements et faux positifs check-in: 7e8d38a146 user: olr tags: fr, trunk
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: core, trunk
18:12
[build][fr] don’t use list as parameter for define() check-in: d2825ab76b user: olr tags: build, fr, trunk
Changes

Changes to js_extension/string.js.

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);
    };
    String.prototype.gl_isUpperCase = function () {
        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();
    };







|


|







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);
    };
    String.prototype.gl_isUpperCase = function () {
        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();
    };