slashslash: Remove double slash (slash a slash)

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/BioGeoBEARS_generics_v1.R

Description

Shortcut for: gsub(pattern="//", replacement="/", x=tmpstr)

Usage

1
  slashslash(tmpstr)

Arguments

tmpstr

a path that you want to remove double slashes from

Details

This function is useful for removing double slashes that can appear in full pathnames due to inconsistencies in trailing slashes in working directories etc.

Value

outstr a string of the fixed path

Author(s)

Nicholas J. Matzke matzke@berkeley.edu

See Also

getwd, setwd, gsub

Examples

1
2
3
4
tmpstr = "/Library/Frameworks//R.framework/Versions/"

outstr = slashslash(tmpstr)
outstr

BioGeoBEARS documentation built on May 29, 2017, 8:36 p.m.