downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  

<mb_strcutmb_stripos>
Last updated: Thu, 26 Jun 2008

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 ]] )

Truncates string str to specified width .

Parameters

str

The string being decoded.

start

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

width

The width of the desired trim.

trimmarker

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

encoding

The encoding parameter is the character encoding. If it is omitted, the internal character encoding value will be used.

Return Values

The truncated string. If trimmarker is set, trimmarker is appended to the return value.

Examples

Example #1 mb_strimwidth() example

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



add a noteadd a note User Contributed Notes
Get truncated string with specified width
There are no user contributed notes for this page.




<mb_strcutmb_stripos>
Last updated: Thu, 26 Jun 2008
show source | credits | sitemap | contact | advertising | mirror sites
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://phpbuilder.com/
Last updated: Tue Nov 1 20:20:59 2005 EST
Columns / Articles | Tips / Quickies | News | News Linking and RSS Feeds | Shared Code Library
Mail Archives | Support / Discussion Forums | Get Started! Links | Contribute! | Docs