R/string_find_first.R

Defines functions string_find_first

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

string_find_first <- function(string, symbol )
{
    nc <- nchar(string)
    ind <- NA
    for (cc in 1L: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 March 13, 2026, 5:06 p.m.