which.char: which.char

which.charR Documentation

which.char

Description

finds the index of the character in subject (length 1 character vector) matching nchar = 1 single character query eg which.char('a', 'cat') = 2

if query has more than one char (or has length>1) then will return indices matching <any one> of the characters in any element of query

Usage

which.char(subject, query)

Arguments

subject

length 1 character vector

query

length 1, nchar 1 character

Value

indices in subject that query appears

Author(s)

Marcin Imielinski


mskilab/skitools documentation built on March 5, 2025, 11:52 p.m.