summaryrefslogtreecommitdiff
path: root/node_modules/locutus/php/strings/strchr.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/locutus/php/strings/strchr.js')
-rw-r--r--node_modules/locutus/php/strings/strchr.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/node_modules/locutus/php/strings/strchr.js b/node_modules/locutus/php/strings/strchr.js
new file mode 100644
index 0000000..5ba1644
--- /dev/null
+++ b/node_modules/locutus/php/strings/strchr.js
@@ -0,0 +1,14 @@
+'use strict';
+
+module.exports = function strchr(haystack, needle, bool) {
+ // discuss at: http://locutus.io/php/strchr/
+ // original by: Philip Peterson
+ // example 1: strchr('Kevin van Zonneveld', 'van')
+ // returns 1: 'van Zonneveld'
+ // example 2: strchr('Kevin van Zonneveld', 'van', true)
+ // returns 2: 'Kevin '
+
+ var strstr = require('../strings/strstr');
+ return strstr(haystack, needle, bool);
+};
+//# sourceMappingURL=strchr.js.map \ No newline at end of file