didYouMean

Formats a hint naming the candidate closest to a mistyped name.

package
string
didYouMean
(
string typed
,
const(string)[] candidates
)

Parameters

typed string

Name that was not recognised.

candidates const(string)[]

Names that would have been accepted.

Return Value

Type: string

A hint such as , did you mean 'serve'?, or an empty string if no candidate is close enough.