R/string_find_first.R

Defines functions string_find_first

## File Name: string_find_first.R
## File Version: 0.03

string_find_first <- function(string, symbol )
{
    nc <- nchar(string)
    ind <- NA
    for (cc in 1:nc){
        if( substring(string,cc,cc)==symbol ){
            ind <- cc
            break
        }
    }
    return(ind)
}
alexanderrobitzsch/miceadds documentation built on Feb. 2, 2024, 10:21 a.m.