The IntlCodePointBreakIterator class
(No version information available, might only be in Git)
Introduction
This break iterator identifies the boundaries between UTF-8 code points.
Class synopsis
/* Constants */
/* Methods */
/* Inherited methods */
ReturnType intl_get_error_code
( void
)
ReturnType intl_get_error_message
( void
)
}Predefined Constants
IntlCodePointBreakIterator::DONE
IntlCodePointBreakIterator::WORD_NONE
IntlCodePointBreakIterator::WORD_NONE_LIMIT
IntlCodePointBreakIterator::WORD_NUMBER
IntlCodePointBreakIterator::WORD_NUMBER_LIMIT
IntlCodePointBreakIterator::WORD_LETTER
IntlCodePointBreakIterator::WORD_LETTER_LIMIT
IntlCodePointBreakIterator::WORD_KANA
IntlCodePointBreakIterator::WORD_KANA_LIMIT
IntlCodePointBreakIterator::WORD_IDEO
IntlCodePointBreakIterator::WORD_IDEO_LIMIT
IntlCodePointBreakIterator::LINE_SOFT
IntlCodePointBreakIterator::LINE_SOFT_LIMIT
IntlCodePointBreakIterator::LINE_HARD
IntlCodePointBreakIterator::LINE_HARD_LIMIT
IntlCodePointBreakIterator::SENTENCE_TERM
IntlCodePointBreakIterator::SENTENCE_TERM_LIMIT
IntlCodePointBreakIterator::SENTENCE_SEP
IntlCodePointBreakIterator::SENTENCE_SEP_LIMIT
Table of Contents
- IntlCodePointBreakIterator::getLastCodePoint — Get last code point passed over after advancing or receding the iterator
- PHP Руководство
- Функции по категориям
- Индекс функций
- Справочник функций
- Поддержка языков и кодировок
- Введение
- Установка и настройка
- Предопределенные константы
- Примеры
- The Collator class
- The NumberFormatter class
- The Locale class
- The Normalizer class
- The MessageFormatter class
- The IntlCalendar class
- The IntlTimeZone class
- The IntlDateFormatter class
- The ResourceBundle class
- The Spoofchecker class
- The Transliterator class
- The IntlBreakIterator class
- The IntlRuleBasedBreakIterator class
- The IntlCodePointBreakIterator class
- The IntlPartsIterator class
- The UConverter class
- Grapheme Функции
- IDN Функции
- IntlChar
- Exception class for intl errors
- The IntlIterator class
- intl Функции
Коментарии
An example of using this to find all the code points in a string that cannot be transliterated to Latin-ASCII:
<?php
$string = "Народm, Intl gurus get paid €10000/hr 😁";
$latinAscii = Transliterator::create('NFC; Any-Latin; Latin-ASCII;');
$transliterated = $latinAscii->transliterate($string);
$codePoints = IntlBreakIterator::createCodePointInstance();
$codePoints->setText($transliterated);
foreach ($codePoints->getPartsIterator() as $char) {
$ord = IntlChar::ord($char);
if (255 < $ord) {
echo IntlChar::charName($ord) . "\n";
}
}
?>
Outputs:
EURO SIGN
GRINNING FACE WITH SMILING EYES