If NULL, the default, ignored. May be used if x is
known to be free of NAs.
na.rm
(logical, default: TRUE) If FALSE, an NA in
x means "" is the only common affix. If NA, the longest
prefix/suffix is NA_character_ (provided anyNA(x)).
If anyNA(x) == FALSEna.rm has no effect.
prefixes
(logical, default: TRUE) If TRUE, trim prefixes.
suffixes
(logical, default: TRUE) If TRUE, trim suffixes.
warn_if_no_prefix, warn_if_no_suffix
(logical, default: TRUE)
If FALSE, if x has no common affixes the warning is suppressed.
(If no common prefix/suffix then the common affix returned will be ""
(the empty string).)
Value
The longest common substring in x either at the start or end of each string.
For trim_common_affixesx with common prefix and common suffix
removed.