CakeFest 2024: The Official CakePHP Conference

pspell_config_ignore

(PHP 4 >= 4.0.2, PHP 5, PHP 7, PHP 8)

pspell_config_ignore長さが N 文字未満の単語を無視する

説明

pspell_config_ignore(PSpell\Config $config, int $min_length): bool

pspell_config_ignore() は、 pspell_new_config() をコールする前に使用しなければなりません。 この関数は、スペルチェッカに無視させる短い単語の長さを指定します。

パラメータ

config

PSpell\Config クラスのインスタンス。

min_length

min_length 文字より短い単語をスキップします。

戻り値

成功した場合に true を、失敗した場合に false を返します。

変更履歴

バージョン 説明
8.1.0 引数 config は、PSpell\Config クラスのインスタンスを期待するようになりました。 これより前のバージョンでは、リソース を期待していました。

例1 pspell_config_ignore()

<?php
$pspell_config
= pspell_config_create("en");
pspell_config_ignore($pspell_config, 5);
$pspell = pspell_new_config($pspell_config);
pspell_check($pspell, "abcd"); // エラーとはなりません
?>

add a note

User Contributed Notes

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