View source: R/strtrimcommon.R
strtrimcommon | R Documentation |
Trim common portions from both sides of a vector of strings
strtrimcommon(x, split = "", USE.NAMES = FALSE, return.all = FALSE)
x |
A vector of strings |
split |
A |
USE.NAMES |
logical; if |
return.all |
logical; if |
A (named) vector of strings, or a list of string vectors (see
parameter return.all
for details).
Michaja Pehl
x <- c('/tmp/remind2_test-convGDX2MIF_fulldata.gdx',
'/tmp/remind2_test-Ariadne_fulldata.gdx',
'/tmp/remind2_test-NAVIGATE_fulldata.gdx',
'/tmp/remind2_test-NGFS_fulldata_oneRegi.gdx',
'/tmp/remind2_test-SHAPE_fulldata.gdx')
strtrimcommon(x, USE.NAMES = TRUE)
x <- c('Some|name|with|common|text|elements',
'Some|name|without|extra|text|elements')
strtrimcommon(x, split = '|', return.all = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.