Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Latest commit

 

History

History
22 lines (16 loc) · 1.73 KB

cp.pattern.md

File metadata and controls

22 lines (16 loc) · 1.73 KB

docs » cp.pattern


Contains pattern matching utility functions.

API Overview

  • Functions - API calls offered directly by the extension
  • doesMatch

API Documentation

Functions

Signature cp.pattern.doesMatch(value, searchString[, options]) -> boolean
Type Function
Description Checks if the provided value matches the search string, given the provided options.
Parameters
  • value - The value to check.
  • searchString - The string values to match.
  • options - The table of options.
Returns
  • true if the value matches the search string
Notes
  • Supported options:
    • caseSensitive - If true, the case in the search string must match the value.
    • exact - If true, the search string must match exactly somewhere within the value. If false, words separated by spaces can appear anywhere in the value.
    • wholeWords - If true, either the whole string (if exact is true) or each word (if exact is false) must match at word boundaries.