search static method

RecordHitInfo? search(
  1. String target,
  2. String query
)

Implementation

static RecordHitInfo? search(String target, String query) {
  var index = kmpSearch(target, query);
  if (index >= 0) {
    return RecordHitInfo(index, index + query.length);
  }
  return null;
}