longest_affix | R Documentation |
Longest common prefix/suffix
trim_common_affixes( x, .x = NULL, na.rm = TRUE, prefixes = TRUE, suffixes = TRUE, warn_if_no_prefix = TRUE, warn_if_no_suffix = TRUE ) longest_suffix(x, .x = NULL, na.rm = TRUE, warn_if_no_suffix = TRUE) longest_prefix(x, .x = NULL, na.rm = TRUE, warn_if_no_prefix = TRUE)
x |
A character vector. |
.x |
If |
na.rm |
(logical, default: If |
prefixes |
(logical, default: |
suffixes |
(logical, default: |
warn_if_no_prefix, warn_if_no_suffix |
(logical, default: |
The longest common substring in x
either at the start or end of each string.
For trim_common_affixes
x
with common prefix and common suffix
removed.
longest_prefix(c("totalx", "totaly", "totalz")) longest_suffix(c("ztotal", "ytotal", "xtotal"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.