Back to index

php5  5.3.10
php_string.h
Go to the documentation of this file.
00001 /* 
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Authors: Rasmus Lerdorf <rasmus@php.net>                             |
00016    |          Stig Sæther Bakken <ssb@php.net>                            |
00017    +----------------------------------------------------------------------+
00018 */
00019 
00020 /* $Id: php_string.h 321634 2012-01-01 13:15:04Z felipe $ */
00021 
00022 /* Synced with php 3.0 revision 1.43 1999-06-16 [ssb] */
00023 
00024 #ifndef PHP_STRING_H
00025 #define PHP_STRING_H
00026 
00027 PHP_FUNCTION(strspn);
00028 PHP_FUNCTION(strcspn);
00029 PHP_FUNCTION(str_replace);
00030 PHP_FUNCTION(str_ireplace);
00031 PHP_FUNCTION(rtrim);
00032 PHP_FUNCTION(trim);
00033 PHP_FUNCTION(ltrim);
00034 PHP_FUNCTION(soundex);
00035 PHP_FUNCTION(levenshtein);
00036 
00037 PHP_FUNCTION(count_chars);
00038 PHP_FUNCTION(wordwrap);
00039 PHP_FUNCTION(explode);
00040 PHP_FUNCTION(implode);
00041 PHP_FUNCTION(strtok);
00042 PHP_FUNCTION(strtoupper);
00043 PHP_FUNCTION(strtolower);
00044 PHP_FUNCTION(basename);
00045 PHP_FUNCTION(dirname);
00046 PHP_FUNCTION(pathinfo);
00047 PHP_FUNCTION(strstr);
00048 PHP_FUNCTION(strpos);
00049 PHP_FUNCTION(stripos);
00050 PHP_FUNCTION(strrpos);
00051 PHP_FUNCTION(strripos);
00052 PHP_FUNCTION(strrchr);
00053 PHP_FUNCTION(substr);
00054 PHP_FUNCTION(quotemeta);
00055 PHP_FUNCTION(ucfirst);
00056 PHP_FUNCTION(lcfirst);
00057 PHP_FUNCTION(ucwords);
00058 PHP_FUNCTION(strtr);
00059 PHP_FUNCTION(strrev);
00060 PHP_FUNCTION(hebrev);
00061 PHP_FUNCTION(hebrevc);
00062 PHP_FUNCTION(user_sprintf);
00063 PHP_FUNCTION(user_printf);
00064 PHP_FUNCTION(vprintf);
00065 PHP_FUNCTION(vsprintf);
00066 PHP_FUNCTION(addcslashes);
00067 PHP_FUNCTION(addslashes);
00068 PHP_FUNCTION(stripcslashes);
00069 PHP_FUNCTION(stripslashes);
00070 PHP_FUNCTION(chr);
00071 PHP_FUNCTION(ord);
00072 PHP_FUNCTION(nl2br);
00073 PHP_FUNCTION(setlocale);
00074 PHP_FUNCTION(localeconv);
00075 PHP_FUNCTION(nl_langinfo);
00076 PHP_FUNCTION(stristr);
00077 PHP_FUNCTION(chunk_split);
00078 PHP_FUNCTION(parse_str);
00079 PHP_FUNCTION(str_getcsv);
00080 PHP_FUNCTION(bin2hex);
00081 PHP_FUNCTION(similar_text);
00082 PHP_FUNCTION(strip_tags);
00083 PHP_FUNCTION(str_repeat);
00084 PHP_FUNCTION(substr_replace);
00085 PHP_FUNCTION(strnatcmp);
00086 PHP_FUNCTION(strnatcasecmp);
00087 PHP_FUNCTION(substr_count);
00088 PHP_FUNCTION(str_pad);
00089 PHP_FUNCTION(sscanf);
00090 PHP_FUNCTION(str_shuffle);
00091 PHP_FUNCTION(str_word_count);
00092 PHP_FUNCTION(str_split);
00093 PHP_FUNCTION(strpbrk);
00094 PHP_FUNCTION(substr_compare);
00095 #ifdef HAVE_STRCOLL
00096 PHP_FUNCTION(strcoll);
00097 #endif
00098 #if HAVE_STRFMON
00099 PHP_FUNCTION(money_format);
00100 #endif
00101 
00102 #if defined(HAVE_LOCALECONV) && defined(ZTS)
00103 PHP_MINIT_FUNCTION(localeconv);
00104 PHP_MSHUTDOWN_FUNCTION(localeconv);
00105 #endif
00106 #if HAVE_NL_LANGINFO
00107 PHP_MINIT_FUNCTION(nl_langinfo);
00108 #endif
00109 
00110 #define strnatcmp(a, b) \
00111        strnatcmp_ex(a, strlen(a), b, strlen(b), 0)
00112 #define strnatcasecmp(a, b) \
00113        strnatcmp_ex(a, strlen(a), b, strlen(b), 1)
00114 PHPAPI int strnatcmp_ex(char const *a, size_t a_len, char const *b, size_t b_len, int fold_case);
00115 
00116 #ifdef HAVE_LOCALECONV
00117 PHPAPI struct lconv *localeconv_r(struct lconv *out);
00118 #endif
00119 
00120 PHPAPI char *php_strtoupper(char *s, size_t len);
00121 PHPAPI char *php_strtolower(char *s, size_t len);
00122 PHPAPI char *php_strtr(char *str, int len, char *str_from, char *str_to, int trlen);
00123 PHPAPI char *php_addslashes(char *str, int length, int *new_length, int freeit TSRMLS_DC);
00124 PHPAPI char *php_addslashes_ex(char *str, int length, int *new_length, int freeit, int ignore_sybase TSRMLS_DC);
00125 PHPAPI char *php_addcslashes(char *str, int length, int *new_length, int freeit, char *what, int wlength TSRMLS_DC);
00126 PHPAPI void php_stripslashes(char *str, int *len TSRMLS_DC);
00127 PHPAPI void php_stripcslashes(char *str, int *len);
00128 PHPAPI void php_basename(char *s, size_t len, char *suffix, size_t sufflen, char **p_ret, size_t *p_len TSRMLS_DC);
00129 PHPAPI size_t php_dirname(char *str, size_t len);
00130 PHPAPI char *php_stristr(char *s, char *t, size_t s_len, size_t t_len);
00131 PHPAPI char *php_str_to_str_ex(char *haystack, int length, char *needle,
00132               int needle_len, char *str, int str_len, int *_new_length, int case_sensitivity, int *replace_count);
00133 PHPAPI char *php_str_to_str(char *haystack, int length, char *needle,
00134               int needle_len, char *str, int str_len, int *_new_length);
00135 PHPAPI char *php_trim(char *c, int len, char *what, int what_len, zval *return_value, int mode TSRMLS_DC);
00136 PHPAPI size_t php_strip_tags(char *rbuf, int len, int *state, char *allow, int allow_len);
00137 PHPAPI size_t php_strip_tags_ex(char *rbuf, int len, int *stateptr, char *allow, int allow_len, zend_bool allow_tag_spaces);
00138 PHPAPI int php_char_to_str_ex(char *str, uint len, char from, char *to, int to_len, zval *result, int case_sensitivity, int *replace_count);
00139 PHPAPI int php_char_to_str(char *str, uint len, char from, char *to, int to_len, zval *result);
00140 PHPAPI void php_implode(zval *delim, zval *arr, zval *return_value TSRMLS_DC);
00141 PHPAPI void php_explode(zval *delim, zval *str, zval *return_value, long limit);
00142 
00143 PHPAPI size_t php_strspn(char *s1, char *s2, char *s1_end, char *s2_end); 
00144 PHPAPI size_t php_strcspn(char *s1, char *s2, char *s1_end, char *s2_end); 
00145 
00146 #ifndef HAVE_STRERROR
00147 PHPAPI char *php_strerror(int errnum);
00148 #define strerror php_strerror
00149 #endif
00150 
00151 #ifndef HAVE_MBLEN
00152 # define php_mblen(ptr, len) 1
00153 #else
00154 # if defined(_REENTRANT) && defined(HAVE_MBRLEN) && defined(HAVE_MBSTATE_T)
00155 #  define php_mblen(ptr, len) ((ptr) == NULL ? mbsinit(&BG(mblen_state)): (int)mbrlen(ptr, len, &BG(mblen_state)))
00156 # else
00157 #  define php_mblen(ptr, len) mblen(ptr, len)
00158 # endif
00159 #endif
00160 
00161 void register_string_constants(INIT_FUNC_ARGS);
00162 
00163 #endif /* PHP_STRING_H */