Sha256: eca0e5e5f2e2acb75eccb7d1b33c366d7261788c2668f47baa14ae0b0bededc7

Contents?: true

Size: 798 Bytes

Versions: 69

Compression:

Stored size: 798 Bytes

Contents

define(['../lang/toString', './WHITE_SPACES'], function(toString, WHITE_SPACES){
    /**
     * Remove chars from beginning of string.
     */
    function ltrim(str, chars) {
        str = toString(str);
        chars = chars || WHITE_SPACES;

        var start = 0,
            len = str.length,
            charLen = chars.length,
            found = true,
            i, c;

        while (found && start < len) {
            found = false;
            i = -1;
            c = str.charAt(start);

            while (++i < charLen) {
                if (c === chars[i]) {
                    found = true;
                    start++;
                    break;
                }
            }
        }

        return (start >= len) ? '' : str.substr(start, len);
    }

    return ltrim;
});

Version data entries

69 entries across 69 versions & 2 rubygems

Version Path
trusty-festivity-extension-2.6.3 node_modules/bower/node_modules/mout/src/string/ltrim.js
trusty-festivity-extension-2.6.2 node_modules/bower/node_modules/mout/src/string/ltrim.js
trusty-festivity-extension-2.6.1 node_modules/bower/node_modules/mout/src/string/ltrim.js
trusty-festivity-extension-2.6 node_modules/bower/node_modules/mout/src/string/ltrim.js
trusty-festivity-extension-2.5.19 node_modules/bower/node_modules/mout/src/string/ltrim.js
trusty-festivity-extension-2.5.18 node_modules/bower/node_modules/mout/src/string/ltrim.js
trusty-festivity-extension-2.5.17 node_modules/bower/node_modules/mout/src/string/ltrim.js
trusty-festivity-extension-2.5.16 node_modules/bower/node_modules/mout/src/string/ltrim.js
trusty-festivity-extension-2.5.15 node_modules/bower/node_modules/mout/src/string/ltrim.js
trusty-festivity-extension-2.5.14 node_modules/bower/node_modules/mout/src/string/ltrim.js
trusty-festivity-extension-2.5.13 node_modules/bower/node_modules/mout/src/string/ltrim.js
trusty-festivity-extension-2.5.12 node_modules/bower/node_modules/mout/src/string/ltrim.js
trusty-festivity-extension-2.5.11 node_modules/bower/node_modules/mout/src/string/ltrim.js
trusty-festivity-extension-2.5.10 node_modules/bower/node_modules/mout/src/string/ltrim.js
trusty-festivity-extension-2.5.9 node_modules/bower/node_modules/mout/src/string/ltrim.js
trusty-festivity-extension-2.5.8 node_modules/bower/node_modules/mout/src/string/ltrim.js
trusty-festivity-extension-2.5.7 node_modules/bower/node_modules/mout/src/string/ltrim.js
trusty-festivity-extension-2.5.6 node_modules/bower/node_modules/mout/src/string/ltrim.js
trusty-festivity-extension-2.5.5 node_modules/bower/node_modules/mout/src/string/ltrim.js
trusty-festivity-extension-2.5.4 node_modules/bower/node_modules/mout/src/string/ltrim.js