has_ext | R Documentation |
check for if the passed name has a file extension
has_ext(name, ext, match_case = TRUE)
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 |
This is not a particularly robust checker, but serves its purpose
has_ext("test.rmd", ".rmd") #TRUE has_ext("test.Rmd", ".rmd", match_case=FALSE) #TRUE has_ext("testrmd", ".rmd") #FALSE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.