From a69f6cf5d2437de2f6011b25fc2b2b890e60ab2b Mon Sep 17 00:00:00 2001 From: "Christoph M. Becker" Date: Mon, 15 Feb 2021 17:12:04 +0100 Subject: [PATCH] Clarify what the 'width' in mb_strimwidth means Co-authored-by: Alex Dowad Closes GH-124. --- .../mbstring/functions/mb-strimwidth.xml | 6 ++++- reference/mbstring/functions/mb-strwidth.xml | 26 +++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/reference/mbstring/functions/mb-strimwidth.xml b/reference/mbstring/functions/mb-strimwidth.xml index 8246e974f2..3462e38482 100644 --- a/reference/mbstring/functions/mb-strimwidth.xml +++ b/reference/mbstring/functions/mb-strimwidth.xml @@ -17,7 +17,11 @@ stringnullencoding&null; - Truncates string string to specified width. + Truncates string string to specified width, + where halfwidth characters count as 1, and fullwidth + characters count as 2. + See &url.unicode.reports.tr;11/ + for details regarding East Asian character widths. diff --git a/reference/mbstring/functions/mb-strwidth.xml b/reference/mbstring/functions/mb-strwidth.xml index 5625cbc1e8..d391c24eee 100644 --- a/reference/mbstring/functions/mb-strwidth.xml +++ b/reference/mbstring/functions/mb-strwidth.xml @@ -17,6 +17,8 @@ Returns the width of string string, where halfwidth characters count as 1, and fullwidth characters count as 2. + See &url.unicode.reports.tr;11/ + for details regarding East Asian character widths. The fullwidth characters are: @@ -109,6 +111,30 @@ + + &reftitle.examples; + + <function>mb_strwidth</function> example + + +]]> + + &example.outputs; + + + + + + &reftitle.seealso;