longestCommonPrefix | R Documentation |
Input is converted to character (e.g. from factor) first.
longestCommonPrefix(strings)
strings |
Vector of strings |
Single string - might be empty ("")
longestCommonPrefix(c("CBA.321", "CBA.77654", "")) ## ""
longestCommonPrefix(c("CBA.321", "CBA.77654", "CB")) ## "CB"
longestCommonPrefix(c("ABC.123", "ABC.456")) ## "ABC."
longestCommonPrefix(c("nothing", "in", "common")) ## ""
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.