Tag

mb_substr

0 views collected around this technical thread.

php中文网 Courses
php中文网 Courses
Jan 15, 2024 · Backend Development

Using PHP mb_substr() for Multibyte String Truncation

The article explains the PHP mb_substr() function, its syntax, parameter meanings, and provides multiple code examples demonstrating how to correctly truncate multibyte strings such as Chinese or Japanese without causing garbled output, along with important usage notes.

MultibytePHPTutorial
0 likes · 4 min read
Using PHP mb_substr() for Multibyte String Truncation
php中文网 Courses
php中文网 Courses
Sep 1, 2023 · Backend Development

PHP mb_substr() Function: Definition, Parameters, Return Value, Usage Notes, and Examples

The PHP mb_substr() function provides multibyte‑aware substring extraction, allowing developers to specify start position, length, and encoding to correctly handle Unicode strings, with detailed parameter explanations, return values, important usage notes, and practical code examples.

Multibytebackendencoding
0 likes · 5 min read
PHP mb_substr() Function: Definition, Parameters, Return Value, Usage Notes, and Examples
php中文网 Courses
php中文网 Courses
Jul 4, 2023 · Backend Development

Using substr() and mb_substr() to Extract Substrings in PHP

This article explains how PHP's substr() and mb_substr() functions work, detailing their syntax, parameter behavior for positive and negative start and length values, and provides multiple code examples demonstrating string extraction for both English and multibyte Chinese characters.

PHPbackendmb_substr
0 likes · 6 min read
Using substr() and mb_substr() to Extract Substrings in PHP
Laravel Tech Community
Laravel Tech Community
May 9, 2023 · Backend Development

Common PHP String Manipulation Functions and Examples

This article explains several essential PHP string functions—including substr, mb_substr, stripos with substr, and direct character indexing—providing clear code examples and output demonstrations for handling both ASCII and multibyte characters.

PHPbackendmb_substr
0 likes · 3 min read
Common PHP String Manipulation Functions and Examples
Laravel Tech Community
Laravel Tech Community
Sep 29, 2020 · Backend Development

PHP mb_substr Function: Multibyte‑Safe Substring Extraction

This article explains the PHP mb_substr() function, detailing its multibyte‑safe substring behavior, parameter list (str, start, length, encoding), return value, and provides a clear example showing how to extract the first two characters from a Chinese string.

MultibytePHPbackend
0 likes · 2 min read
PHP mb_substr Function: Multibyte‑Safe Substring Extraction
Laravel Tech Community
Laravel Tech Community
Aug 19, 2020 · Backend Development

Using mb_substr() for Multibyte-Safe Substring Extraction in PHP

The article explains PHP's mb_substr() function for multibyte-safe substring extraction, detailing its parameters, usage, and return value, and provides two practical code examples demonstrating how to extract Chinese characters with specified length and encoding.

MultibytePHPencoding
0 likes · 2 min read
Using mb_substr() for Multibyte-Safe Substring Extraction in PHP
Laravel Tech Community
Laravel Tech Community
May 27, 2020 · Backend Development

PHP mb_substr() Function: Multibyte‑Safe Substring Operation

This article explains PHP’s mb_substr() function, detailing its multibyte‑safe substring behavior, parameter definitions, return value, and provides a practical code example illustrating how to extract a portion of a Chinese string correctly.

MultibytePHPbackend
0 likes · 2 min read
PHP mb_substr() Function: Multibyte‑Safe Substring Operation