filenamise: Sanitise a String (URL/filename safe)

Description Usage Arguments Value

View source: R/blog_stuff.R

Description

Sanitise a string (downcasing, and removing puctuation and spaces), so that it can safely be used in a URL or file path. Note: For URLs, hyphens, as opposed to underscores are preferred by search bots.

Usage

1
2
3
4
5
6
7
filenamise(x, sep_char = "_", ext = "")

filenamize(x, sep_char = "_", ext = "")

filenameize(x, sep_char = "_", ext = "")

filenameise(x, sep_char = "_", ext = "")

Arguments

x

The string to be santised

sep_char

The character to use in place of spaces/punctuation found in x

ext

A file extenstion to be appended to the end of the result

Value

character


brendan-r/brocks documentation built on Feb. 17, 2018, 11:34 a.m.