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)
}

Try the miceadds package in your browser

Any scripts or data that you put into this service are public.

miceadds documentation built on May 29, 2024, 11:05 a.m.