Grammalecte  Diff

Differences From Artifact [9b41fc7a14]:

To Artifact [33525a019a]:


1
2
3
4
5
6
7
8
9
10
11
12
//// STRING TRANSFORMATION

// Note: 48 is the ASCII code for "0"

var str_transform = {
    getStemFromSuffixCode: function (sFlex, sSfxCode) {
        // Suffix only
        if (sSfxCode == "0") {
            return sFlex;
        }
        return sSfxCode[0] == '0' ? sFlex + sSfxCode.slice(1) : sFlex.slice(0, -(sSfxCode.charCodeAt(0)-48)) + sSfxCode.slice(1);
    },




|







1
2
3
4
5
6
7
8
9
10
11
12
//// STRING TRANSFORMATION

// Note: 48 is the ASCII code for "0"

const str_transform = {
    getStemFromSuffixCode: function (sFlex, sSfxCode) {
        // Suffix only
        if (sSfxCode == "0") {
            return sFlex;
        }
        return sSfxCode[0] == '0' ? sFlex + sSfxCode.slice(1) : sFlex.slice(0, -(sSfxCode.charCodeAt(0)-48)) + sSfxCode.slice(1);
    },