diff options
Diffstat (limited to 'node_modules/locutus/php/strings/strpos.js')
-rw-r--r-- | node_modules/locutus/php/strings/strpos.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/node_modules/locutus/php/strings/strpos.js b/node_modules/locutus/php/strings/strpos.js new file mode 100644 index 0000000..257151b --- /dev/null +++ b/node_modules/locutus/php/strings/strpos.js @@ -0,0 +1,15 @@ +'use strict'; + +module.exports = function strpos(haystack, needle, offset) { + // discuss at: http://locutus.io/php/strpos/ + // original by: Kevin van Zonneveld (http://kvz.io) + // improved by: Onno Marsman (https://twitter.com/onnomarsman) + // improved by: Brett Zamir (http://brett-zamir.me) + // bugfixed by: Daniel Esteban + // example 1: strpos('Kevin van Zonneveld', 'e', 5) + // returns 1: 14 + + var i = (haystack + '').indexOf(needle, offset || 0); + return i === -1 ? false : i; +}; +//# sourceMappingURL=strpos.js.map
\ No newline at end of file |