Grammalecte  Check-in [d9bc063523]

Overview
Comment:[core][js] update custom string functions for JavaScript
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | core
Files: files | file ages | folders
SHA3-256: d9bc063523f0099e1d17be3a300a204583b2cab6efa135f5b54955549597e1c2
User & Date: olr on 2020-07-06 19:15:36
Other Links: manifest | tags
Context
2020-07-06
19:42
[fr] confusion entré/entrée check-in: 593a786ec7 user: olr tags: trunk, fr
19:15
[core][js] update custom string functions for JavaScript check-in: d9bc063523 user: olr tags: trunk, core
19:03
[core] fix capitalization for suggestions check-in: 0f461c6f8d user: olr tags: trunk, core
Changes

Modified js_extension/string.js from [36da9cf88b] to [d964129734].

26
27
28
29
30
31
32
33

34
35
36
37
38
39
40
26
27
28
29
30
31
32

33
34
35
36
37
38
39
40







-
+







    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  &&  this.search(/^[0-9]+$/) === -1);
    };
    String.prototype.gl_isTitle = function () {
        return (this.search(/^[A-ZÀ-ÖØ-ߌ ][a-zà-öø-ÿff-st '’-]+$/) !== -1);
        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();
    };
    String.prototype.gl_expand = function (oMatch) {
        let sNew = this;
        for (let i = 0; i < oMatch.length ; i++) {