contains.js 315 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 12 13 14 define(['../lang/toString'], function(toString) { /** * Searches for a given substring */ function contains(str, substring, fromIndex){ str = toString(str); substring = toString(substring); return str.indexOf(substring, fromIndex) !== -1; } return contains; });