R/string_find_last.R

Defines functions string_find_last

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

string_find_last <- function(string, symbol )
{
    nc <- nchar(string)
    ind <- NA
    for (cc in seq(nc,1,-1) ){
        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 Jan. 7, 2023, 1:09 a.m.