diff options
Diffstat (limited to 'node_modules/locutus/php/strings/strcmp.js')
-rw-r--r-- | node_modules/locutus/php/strings/strcmp.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/node_modules/locutus/php/strings/strcmp.js b/node_modules/locutus/php/strings/strcmp.js new file mode 100644 index 0000000..1d58211 --- /dev/null +++ b/node_modules/locutus/php/strings/strcmp.js @@ -0,0 +1,16 @@ +"use strict"; + +module.exports = function strcmp(str1, str2) { + // discuss at: http://locutus.io/php/strcmp/ + // original by: Waldo Malqui Silva (http://waldo.malqui.info) + // input by: Steve Hilder + // improved by: Kevin van Zonneveld (http://kvz.io) + // revised by: gorthaur + // example 1: strcmp( 'waldo', 'owald' ) + // returns 1: 1 + // example 2: strcmp( 'owald', 'waldo' ) + // returns 2: -1 + + return str1 === str2 ? 0 : str1 > str2 ? 1 : -1; +}; +//# sourceMappingURL=strcmp.js.map
\ No newline at end of file |