PHP: enchant_dict_quick_check - Manual

downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

enchant_dict_store_replacement enchant_dict_is_in_session

Last updated: Sat, 27 Jan 2007

view this page in

# enchant_dict_quick_check

(PECL)

enchant_dict_quick_check -- Check the word is correctly spelled and provide suggestions

## Описание

bool enchant_dict_quick_check ( resource dict, string word [, array &suggestions] )

If the word is correctly spelled return `TRUE`, otherwise return `FALSE`, if suggestions variable is provided, fill it with spelling alternatives.

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

`dict`

  Dictionary resource

`word`

  The word to check

`suggestions`

  If the word is not correctly spelled, this variable will contain an array of suggestions.

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

Returns `TRUE` if the word is correctly spelled or `FALSE`

## Примеры

Пример 1. A enchant_dict_quick_check() example

`<?php
$tag = 'en_US';
$r = enchant_broker_init();
if (enchant_broker_dict_exists($r,$tag)) {
$d = enchant_broker_request_dict($r, $tag);
enchant_dict_quick_check($d, 'soong', $suggs);
print_r($suggs);
}
?>`

Результатом выполнения данного примера будет что-то подобное:

    Array
    (
        [0] => song
        [1] => snog
        [2] => soon
        [3] => Sang
        [4] => Sung
        [5] => sang
        [6] => sung
        [7] => sponge
        [8] => spongy
        [9] => snag
        [10] => snug
        [11] => sonic
        [12] => sing
        [13] => songs
        [14] => Son
        [15] => Sonja
        [16] => Synge
        [17] => son
        [18] => Sejong
        [19] => sarong
        [20] => sooner
        [21] => Sony
        [22] => sown
        [23] => scone
        [24] => song's
    )

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

enchant_dict_check()
enchant_dict_suggest()

add a note User Contributed Notes
enchant_dict_quick_check
There are no user contributed notes for this page.
enchant_dict_store_replacement enchant_dict_is_in_session

Last updated: Sat, 27 Jan 2007
show source | credits | stats | sitemap | contact | advertising | mirror sites
Copyright © 2001-2007 The PHP Group
All rights reserved.
This mirror generously provided by: Yahoo! Inc.
Last updated: Sat Mar 10 09:32:46 2007 PST