Добро пожаловать на форум PHP программистов!
За последние 24 часа нас посетили 21924 программиста и 988 роботов. Сейчас ищут 659 программистов ...
Приступая к работе

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

Вернуться к: HaruPage

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

Описание

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

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

Список параметров

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.

Возвращаемые значения

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.

Ошибки

Вызывает исключение HaruException при ошибке.

Смотрите также



Вернуться к: HaruPage

© 2024 «PHP.RU — Сообщество PHP-Программистов»
Главная | Форум | Реклама на сайте | Контакты VIP Сувениры
Разработка компании ODware