# Yahoo! UI Library

### autocomplete 3.3.0

Yahoo! UI Library > autocomplete > AutoCompleteHighlighters
Search:
Filters Show Private Show Protected Show Deprecated

## `static` Class AutoCompleteHighlighters

Provides pre-built result highlighters for AutoComplete.

### Methods

#### charMatch

`static Array charMatch ( query , results )`
Highlights any individual query character that occurs anywhere in a result. Case-insensitive.

Parameters:
  `query <String>` Query to match
  `results <Array>` Results to highlight

Returns: `Array`
  Highlighted results

#### charMatchCase

`static Array charMatchCase ( query , results )`
Case-sensitive version of `charMatch()`.

Parameters:
  `query <String>` Query to match
  `results <Array>` Results to highlight

Returns: `Array`
  Highlighted results

#### charMatchFold

`static Array charMatchFold ( query , results )`
Accent-folding version of `charMatch()`.

Parameters:
  `query <String>` Query to match
  `results <Array>` Results to highlight

Returns: `Array`
  Highlighted results

#### phraseMatch

`static Array phraseMatch ( query , results )`
Highlights the complete query as a phrase anywhere within a result. Case-insensitive.

Parameters:
  `query <String>` Query to match
  `results <Array>` Results to highlight

Returns: `Array`
  Highlighted results

#### phraseMatchCase

`static Array phraseMatchCase ( query , results )`
Case-sensitive version of `phraseMatch()`.

Parameters:
  `query <String>` Query to match
  `results <Array>` Results to highlight

Returns: `Array`
  Highlighted results

#### phraseMatchFold

`static Array phraseMatchFold ( query , results )`
Accent-folding version of `phraseMatch()`.

Parameters:
  `query <String>` Query to match
  `results <Array>` Results to highlight

Returns: `Array`
  Highlighted results

#### startsWith

`static Array startsWith ( query , results )`
Highlights the complete query as a phrase at the beginning of a result. Case-insensitive.

Parameters:
  `query <String>` Query to match
  `results <Array>` Results to highlight

Returns: `Array`
  Highlighted results

#### startsWithCase

`static Array startsWithCase ( query , results )`
Case-sensitive version of `startsWith()`.

Parameters:
  `query <String>` Query to match
  `results <Array>` Results to highlight

Returns: `Array`
  Highlighted results

#### startsWithFold

`static Array startsWithFold ( query , results )`
Accent-folding version of `startsWith()`.

Parameters:
  `query <String>` Query to match
  `results <Array>` Results to highlight

Returns: `Array`
  Highlighted results

#### wordMatch

`static Array wordMatch ( query , results )`
Highlights individual words in results that are also in the query. Non-word characters like punctuation are ignored. Case-insensitive.

Parameters:
  `query <String>` Query to match
  `results <Array>` Results to filter

Returns: `Array`
  Filtered results

#### wordMatchCase

`static Array wordMatchCase ( query , results )`
Case-sensitive version of `wordMatch()`.

Parameters:
  `query <String>` Query to match
  `results <Array>` Results to filter

Returns: `Array`
  Filtered results

#### wordMatchFold

`static Array wordMatchFold ( query , results )`
Accent-folding version of `wordMatch()`.

Parameters:
  `query <String>` Query to match
  `results <Array>` Results to highlight

Returns: `Array`
  Highlighted results

Copyright © 2011 Yahoo! Inc. All rights reserved.