downloads | documentation | faq | getting help | mailing lists | reporting bugs | sites | links | my 
search for in the  
Last updated: Mon, 16 Jul 2012


(PHP 4 >= 4.0.6, PHP 5)

mb_strimwidth -- Get truncated string with specified width


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

mb_strimwidth() 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. (First 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.

例子 1. mb_strimwidth() example

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

See also mb_strwidth() and mb_internal_encoding().

 Last updated: Mon, 16 Jul 2012
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at:
Last updated: Thu Jul 7 19:13:47 2005 CST