diff options
Diffstat (limited to 'ext/standard/php_string.h')
-rw-r--r-- | ext/standard/php_string.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/standard/php_string.h b/ext/standard/php_string.h index 467e85789e..81d703553d 100644 --- a/ext/standard/php_string.h +++ b/ext/standard/php_string.h @@ -82,6 +82,14 @@ PHP_FUNCTION(similar_text); PHP_FUNCTION(strip_tags); PHP_FUNCTION(str_repeat); PHP_FUNCTION(substr_replace); +PHP_FUNCTION(strnatcmp); +PHP_FUNCTION(strnatcasecmp); + +#define strnatcmp(a, b) \ + strnatcmp_ex(a, strlen(a), b, strlen(b), 0) +#define strnatcasecmp(a, b) \ + strnatcmp_ex(a, strlen(a), b, strlen(b), 1) +PHPAPI int strnatcmp_ex(char const *a, size_t a_len, char const *b, size_t b_len, int fold_case); PHPAPI char *php_strtoupper(char *s, size_t len); PHPAPI char *php_strtolower(char *s, size_t len); |