PHP 7.4.0RC2 Released!

HaruPage::measureText

(PECL haru >= 0.0.1)

HaruPage::measureTextCalculate the byte length of characters which can be included on one line of the specified width

Açıklama

HaruPage::measureText ( string $text , float $width [, bool $wordwrap = FALSE ] ) : int

Get the byte length of characters which can be included on one line of the specified width.

Değiştirgeler

text

The text to measure.

width

The width of the line.

wordwrap

When this parameter is set to TRUE the function "emulates" word wrapping by stopping after the last full word (delimited by whitespace) that can fit on the line.

Dönen Değerler

Returns the byte length of characters which can be included within the specified width. For single-byte encodings, this is equal to the number of characters. For multi-byte encodings, this is not necessarily the case.

Hatalar/İstisnalar

Hata durumunda bir HaruException istisnası oluşur.

Ayrıca Bakınız

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top