Sha256: b9f2396a78b6076a9ef2125b5b062943de7336fc4eef2a06d5f199f47d6e3730
Contents?: true
Size: 513 Bytes
Versions: 62
Compression:
Stored size: 513 Bytes
Contents
/* */ 'use strict'; var $def = require('./$.def'), toLength = require('./$.to-length'), context = require('./$.string-context'); $def($def.P + $def.F * !require('./$.fails')(function() { 'q'.startsWith(/./); }), 'String', {startsWith: function startsWith(searchString) { var that = context(this, searchString, 'startsWith'), index = toLength(Math.min(arguments[1], that.length)), search = String(searchString); return that.slice(index, index + search.length) === search; }});
Version data entries
62 entries across 31 versions & 1 rubygems