# dmd.root.speller

Spell checker

#### Discussion

Does not have any dependencies on the rest of DMD.

#### Authors

Walter Bright, http://www.digitalmars.com

#### License

Boost License 1.0

Source: root/speller.d

Documentation: https://dlang.org/phobos/dmd_root_speller.html

Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/root/speller.d

- `speller`

  #### Declaration

  `auto `speller`(alias dg)(const(char)[] `seed`) if (isSearchFunction!dg);`

  Looks for correct spelling. Looks a distance of up to two. This does an exhaustive search, so can potentially be very slow.

  #### Parameters

  `const(char)[] `seed`` | wrongly spelled word
  `dg` | search delegate of the form `T delegate(const(char)[] p, out int cost)`

  #### Return Value

  T.init = no correct spellings found, otherwise the value returned by dg() for first possible correct spelling