Mercurial > repos > prog > lcmsmatching
comparison fshlp.R @ 6:f86fec07f392 draft default tip
planemo upload commit c397cd8a93953798d733fd62653f7098caac30ce
author | prog |
---|---|
date | Fri, 22 Feb 2019 16:04:22 -0500 |
parents | fb9c0409d85c |
children |
comparison
equal
deleted
inserted
replaced
5:fb9c0409d85c | 6:f86fec07f392 |
---|---|
1 if ( ! exists('extname')) { # Do not load again if already loaded | |
2 | |
3 source('strhlp.R') | |
4 | |
5 ########### | |
6 # EXTNAME # | |
7 ########### | |
8 | |
9 extname <- function(path) { | |
10 return(sub('^.*\\.([^.]*)$', '\\1', path, perl = TRUE)) | |
11 } | |
12 | |
13 ############## | |
14 # REMOVE EXT # | |
15 ############## | |
16 | |
17 remove.ext <- function(path) { | |
18 return(sub('\\.[^.]*$', '', path)) | |
19 } | |
20 } |