filesstrings (version 2.0.0)

before_last_dot: Get the part of a string before the last period.

Description

This is usually used to get the part of a file name that doesn't include the file extension. It is vectorized over string. If there is no period in string, the input is returned.

Usage

before_last_dot(string)

Arguments

string

A character vector.

Value

A character vector.

Examples

Run this code
# NOT RUN {
before_last_dot(c("spreadsheet1.csv", "doc2.doc", ".R"))

# }

Run the code above in your browser using DataLab