Check if the text starts with specific characters (search). search can be a text or a regular expression.

Examples

  • startWith("search", /s../)true
  • startWith("search", "se")true
  • startWith("Search", /s../i)true
  • startWith("Search", "ar)false