mb_strimwidth

(PHP 4 CVS only)

mb_strimwidth -- Get truncated string with specified width

Description

string mb_strmwidth (string str, int start, int width, string trimmarker [, string encoding])

mb_strmwidth() truncates string str to specified width. It returns truncated string.

If trimmarker is set, trimmarker is appended to return value.

start is start position offset. Number of characters from the beginning of string. (Fist character is 0)

trimmarker is string that is added to the end of string when string is truncated.

encoding is character encoding. If it is omitted, internal encoding is used.

Example 1. mb_strimwidth() example


$str = mb_strimwidth($str, 0, 40, "..>");
      

See also: mb_strwidth(), mb_internal_encoding().


HIVE: All information for read only. Please respect copyright!
Hosted by hive КГБ: Киевская городская библиотека