Changeset 36017
- Timestamp:
- 12/19/2015 04:46:43 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/compat.php
r35805 r36017 43 43 44 44 if ( ! function_exists( 'mb_substr' ) ) : 45 /** 46 * Compat function to mimic mb_substr(). 47 * 48 * @ignore 49 * @since 3.2.0 50 * 51 * @param string $str The string to extract the substring from. 52 * @param int $start Position to being extraction from in `$str`. 53 * @param int|null $length Optional. Maximum number of characters to extract from `$str`. 54 * Default null. 55 * @param string|null $encoding Optional. Character encoding to use. Default null. 56 * @return string Extracted substring. 57 */ 45 58 function mb_substr( $str, $start, $length = null, $encoding = null ) { 46 59 return _mb_substr( $str, $start, $length, $encoding ); … … 48 61 endif; 49 62 50 /* 63 /** 64 * Internal compat function to mimic mb_substr(). 65 * 51 66 * Only understands UTF-8 and 8bit. All other character sets will be treated as 8bit. 52 67 * For $encoding === UTF-8, the $str input is expected to be a valid UTF-8 byte sequence. 53 68 * The behavior of this function for invalid inputs is undefined. 69 * 70 * @ignore 71 * @since 3.2.0 72 * 73 * @param string $str The string to extract the substring from. 74 * @param int $start Position to being extraction from in `$str`. 75 * @param int|null $length Optional. Maximum number of characters to extract from `$str`. 76 * Default null. 77 * @param string|null $encoding Optional. Character encoding to use. Default null. 78 * @return string Extracted substring. 54 79 */ 55 80 function _mb_substr( $str, $start, $length = null, $encoding = null ) {
Note: See TracChangeset
for help on using the changeset viewer.