Path/URL: Fill Blank Spaces

Usage

UF(path = "clipboard", copy2clip = interactive(), fill = "_")

PF(path = "clipboard", copy2clip = interactive(), fill = "%")

US(path = "clipboard", copy2clip = interactive(), fill = "_")

Arguments

path
A character vector or url/path copied to the clipboard. Default is to read from the clipboard.
copy2clip
logical. If TRUE attempts to copy the output to the clipboard.
fill
The character symbol to fill the blank spaces with.

Value

Returns a character vector every space replaced with an underscore/percent And apostophes removed. UF also converts the text to lower case.

Description

UF - A convenience function to replace black spaces of paths with underscores.

PF - A convenience function to replace black spaces of URLs with percents.

US - A convenience function to replace black spaces of paths with underscores.

Warning

Ligatures parsing is very good, however, these elements may be incorrect. If a warning is thrown check the use of "ff", "fi", "fl", "ffi" and "ffl".

Notice

US is deprecated and will be removed from reports in a version subsequent to version 0.2.0 Please use UF instead.

Examples

UF("bad path with spaces")
[1] "bad_path_with_spaces"
PF("https://github.com/trinker/reports/fictional path to nowhere.pdf")
[1] "https://github.com/trinker/reports/fictional%path%to%nowhere.pdf"