blob: a9f47905bdf954e68276e4d7318f3043abc074d5 [file] [log] [blame]
var makeString = require('./helper/makeString');
var toPositive = require('./helper/toPositive');
module.exports = function startsWith(str, starts, position) {
str = makeString(str);
starts = '' + starts;
position = position == null ? 0 : Math.min(toPositive(position), str.length);
return str.lastIndexOf(starts, position) === position;
};