has_ext: check for if the passed name has a file extension

Description Usage Arguments Details Examples

View source: R/has_ext.R

Description

check for if the passed name has a file extension

Usage

1
has_ext(name, ext, match_case = TRUE)

Arguments

name

string name to check for extension

ext

string of extension to check

match_case

logical whether to match the case when checking extension. defaults to TRUE

Details

This is not a particularly robust checker, but serves its purpose

Examples

1
2
3
4
5
6
## Not run: 
has_ext("test.rmd", ".rmd") #TRUE
has_ext("test.Rmd", ".rmd", match_case=F) #TRUE
has_ext("testrmd", ".rmd") #FALSE

## End(Not run)

PKPDmisc documentation built on April 14, 2020, 5:49 p.m.