str_get_after_last_separator: Return everything between after last occurence of separator...

View source: R/str_get_after_last_separator.R

str_get_after_last_separatorR Documentation

Return everything between after last occurence of separator and end of the string.

Description

Return everything between after last occurence of separator and end of the string.

Usage

str_get_after_last_separator(
  string = "a.b?c.net",
  separator = ".",
  include_sep_in_output = FALSE
)

Arguments

string

A character string.

separator

Default ".".

include_sep_in_output

Optional. Include the separator in the output. Default FALSE.

Examples

str <- "I am smart enough, good looking enough, and gosh darn it; people like me."
str_get_after_last_separator(str, separator = ",")
[1] " and gosh darn it; people like me."
str_get_after_last_separator(str, separator = ",", include_sep_in_output = T)
[1] ", and gosh darn it; people like me."

uva-bi-sdad/dc.utils documentation built on Aug. 1, 2022, 1:45 a.m.