Changeset 36019 for trunk/src/wp-includes/compat.php
- Timestamp:
- 12/19/2015 04:55:50 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/compat.php
r36018 r36019 48 48 * @ignore 49 49 * @since 3.2.0 50 * 51 * @see _mb_substr() 50 52 * 51 53 * @param string $str The string to extract the substring from. … … 131 133 132 134 if ( ! function_exists( 'mb_strlen' ) ) : 135 /** 136 * Compat function to mimic mb_strlen(). 137 * 138 * @ignore 139 * @since 4.2.0 140 * 141 * @see _mb_strlen() 142 * 143 * @param string $str The string to retrieve the character length from. 144 * @param string|null $encoding Optional. Character encoding to use. Default null. 145 * @return int String length of `$str`. 146 */ 133 147 function mb_strlen( $str, $encoding = null ) { 134 148 return _mb_strlen( $str, $encoding ); … … 136 150 endif; 137 151 138 /* 152 /** 153 * Internal compat function to mimic mb_strlen(). 154 * 139 155 * Only understands UTF-8 and 8bit. All other character sets will be treated as 8bit. 140 * For $encoding === UTF-8, the $str input is expected to be a valid UTF-8 byte sequence. 141 * The behavior of this function for invalid inputs is undefined. 156 * For $encoding === UTF-8, the `$str` input is expected to be a valid UTF-8 byte 157 * sequence. The behavior of this function for invalid inputs is undefined. 158 * 159 * @ignore 160 * @since 4.2.0 161 * 162 * @param string $str The string to retrieve the character length from. 163 * @param string|null $encoding Optional. Character encoding to use. Default null. 164 * @return int String length of `$str`. 142 165 */ 143 166 function _mb_strlen( $str, $encoding = null ) {
Note: See TracChangeset
for help on using the changeset viewer.