locate_pattern: Locate index of pattern

View source: R/read.R

locate_patternR Documentation

Locate index of pattern

Description

Search each line in .lines for the regex .pattern and return the first index of a match. Yields an error if the pattern cannot be located.

Usage

locate_pattern(.lines, .pattern)

Arguments

.lines

A character vector.

.pattern

Pattern to look for.

Value

An integer value.


albutz/tidyhelpr documentation built on May 9, 2022, 12:03 a.m.