Tag

substring

1 views collected around this technical thread.

Laravel Tech Community
Laravel Tech Community
Oct 10, 2020 · Backend Development

PHP mb_strstr() – Find First Occurrence of a Substring

The article explains PHP’s mb_strstr() function, detailing its syntax, how it finds the first occurrence of a needle in a haystack, the optional before_needle and encoding parameters, and the return values including FALSE when the needle is absent.

Backendmb_strstrphp
0 likes · 2 min read
PHP mb_strstr() – Find First Occurrence of a Substring
Laravel Tech Community
Laravel Tech Community
Sep 30, 2020 · Backend Development

PHP mb_substr_count: Counting Substring Occurrences

The article explains PHP's mb_substr_count function, detailing its syntax, parameters, return value, and provides a practical example showing how to count the number of times a substring appears within a multibyte string.

BackendString()mb_substr_count
0 likes · 2 min read
PHP mb_substr_count: Counting Substring Occurrences
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.

MultibyteString()encoding
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.

BackendMultibyteString()
0 likes · 2 min read
PHP mb_substr() Function: Multibyte‑Safe Substring Operation
Python Programming Learning Circle
Python Programming Learning Circle
Sep 22, 2018 · Backend Development

How to Accurately Substring Chinese Text in PHP Across GBK and UTF-8

This guide explains how to correctly truncate strings containing Chinese characters in PHP by detecting character byte length for GBK and UTF‑8 encodings, and provides a reusable my_substr function with example usage.

Chinese charactersGBKUTF-8
0 likes · 4 min read
How to Accurately Substring Chinese Text in PHP Across GBK and UTF-8
Qunar Tech Salon
Qunar Tech Salon
Dec 24, 2014 · Fundamentals

Understanding Java String.substring Memory Leak in JDK 6 and Its Fix in JDK 7

This article explains how the original JDK 6 implementation of String.substring could retain large character arrays and cause apparent memory‑leak‑like OutOfMemoryError, describes the underlying fields, reproduces the issue, and shows how JDK 7’s copy‑on‑substring redesign resolves the problem.

Garbage CollectionJDK6JDK7
0 likes · 10 min read
Understanding Java String.substring Memory Leak in JDK 6 and Its Fix in JDK 7