Javascript String startswith(entity)

Description

Javascript String startswith(entity)

String.prototype.startswith = function(entity) {
    if (!entity) return false;
    if ('string' !== typeof(entity)) return false;

    return 0 === this.indexOf(entity);
};



PreviousNext

Related