clean_path: standardize paths and easy clipboard path updating

View source: R/clean_path.R

clean_pathR Documentation

standardize paths and easy clipboard path updating

Description

paths often have extra slashes, or in opposing directions. These functions standardize slashes

Usage

clean_path(path, backslash = T, force_endslash = F)

backslash(path)

forwardslash(path)

bs()

fs()

Arguments

path

supply a path

backslash

T/F backslashes or forwardslashes?

force_endslash

T/F cap path with slash?

Details

standardizes slashes - forward or back

This program is free software but it is provided WITHOUT WARRANTY and with ABSOLUTELY NO GUARANTEE of fitness or functionality for any purpose; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.


Revision History

1.0 2015 Jan 29 Roxygen header prepared

Value

updated path

Author(s)

Jacob Strunk <jstrunk@fs.fed.us>

See Also

grep
gsub

Examples


       clean_path("c:\\temp",F,F)
       clean_path("c:\\temp",T,F)
       clean_path("c:\\temp",T,T)

       clean_path("c:/temp/",F,F)
       clean_path("c:\\temp\\\\",T,F)
       clean_path("c:\\temp\\\\",T,T)





jstrunk001/RSForInvt documentation built on April 18, 2022, 11:03 p.m.