PHP: mb_strimwidth - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

mb_stripos mb_strcut

Last updated: Sat, 27 Jan 2007

view this page in

# mb_strimwidth

(PHP 4 >= 4.0.6, PHP 5)

mb_strimwidth -- Get truncated string with specified width

## Description

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

`<?php $str = mb_strimwidth($str, 0, 40, "..>"); ?>`

See also mb_strwidth() and mb_internal_encoding().

add a note User Contributed Notes
mb_strimwidth
There are no user contributed notes for this page.
mb_stripos mb_strcut

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 10:36:09 2007 PST