SpellCheck
SpellCheck(speller, word)
Checks the spelling of a word.
DISCUSSION
- speller
- The frame returned by the *
SpellDocBegin
function.
- word
- A string containing a word to spell check.
- return value
- A
nil
value indicates that the word or number is correct. A non-nil
value indicates that the word may need to be corrected.
This function first processes the word as described in "Processing of Words Passed to the Spell Checker". It then looks to see if the word is in one of the dictionaries or word lists. If so, *
SpellCheck
returnsnil
. If the word is not in a dictionary, or if its capitalization is not correct, then *SpellCheck
returns non-nil
.Here are some examples:
SpellCheck(s, "and") => nil // word is spelled correctly
SpellCheck(s, "And") => nil // word is spelled correctly SpellCheck(s, "AND") => nil // word is spelled correctly SpellCheck(s, "ernie") => non-nil // capitalization is wrong SpellCheck(s, "Ernie") => nil // word is spelled correctly SpellCheck(s, "ERNIE") => nil // word is spelled correctly SpellCheck(s, "irs") => non-nil // word needs all caps SpellCheck(s, "Irs") => non-nil // word needs all caps SpellCheck(s, "IRS") => nil // word is spelled correctly SpellCheck(s, "(and.)") => nil // word is spelled correctly SpellCheck(s, "(bxnd.)") => non-nil // word is not spelled correctly SpellCheck(s, "isn't") => nil // word is spelled correctly SpellCheck(s, "isn't") => nil // word is spelled correctly SpellCheck(s, "so-so") => non-nil // word is not spelled correctly SpellCheck(s, "ab#de") => non-nil // word is not spelled correctly SpellCheck(s, "so") => nil // word is spelled correctly
Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help