file_string: Substitute All Blanks and Punctuations in a String with an...

View source: R/file_string.R

file_stringR Documentation

Substitute All Blanks and Punctuations in a String with an Underscore

Description

Need to store stuff on disk. Replacement may also be a minus sign instead of underscore.

Usage

file_string(x, replacement = c("_", "-"))

Arguments

x

A string.

replacement

The replacement character.

Value

A string.

See Also

Other file utilities: clipboard_path(), delete_trailing_blank_lines(), delete_trailing_whitespace(), develop_test(), file_copy(), file_modified_last(), file_save(), find_files(), get_lines_between_tags(), get_mtime(), get_unique_string(), grep_file(), is_files_current(), is_path(), paths, runsed(), search_files(), split_code_file(), touch()

Other vector functions: char2factor(), escape_non_ascii()

Examples

file_string("foo:bar$ this, indeed(!) is # a number 7")
file_string("foo:bar$ this, indeed(!) is # a number 7", replacement = "-")

fritools documentation built on June 8, 2025, 11:59 a.m.