search function

int search(
  1. String str,
  2. RegExp pattern
)

Implementation

int search(String str, RegExp pattern) => str.indexOf(pattern);