Determine a prefix from a character vector str of similar contents
determinePrefix.RdThe result is such that all(startsWith(str,determinePrefix(str)))
is TRUE.
Arguments
- str
a character vector
- split
the token to use for strsplit instead of '-', this should be
character(0)if you want to split letter by letter- collapse
the words constituents in the input that are found to be uniform in the input are connected via paste and this "collapse" value.