pos: Retrieve the position of a char in a string

View source: R/utils.R

posR Documentation

Retrieve the position of a char in a string

Description

pos is used to find the position of a specific char or pattern into a string If pattern is a single character, the first position of this character in the searched string is returned If pattern is a regular expression, the result is 0 if the expression is not verified or the position of the first pattern in the string stosearch

Usage

pos(pattern, stosearch)

Arguments

pattern

A pattern to search in stosearch

stosearch

A character string

Value

Position of pattern in stosearch

Examples

pos("/","test/string")


Epiconcept-Paris/STRAP-epiuf documentation built on Aug. 5, 2024, 3:41 a.m.