longestCommonSuffix {PTXQC}R Documentation

Like longestCommonPrefix(), but on the suffix.

Description

Like longestCommonPrefix(), but on the suffix.

Usage

longestCommonSuffix(strings)

Arguments

strings

Vector of strings

Value

Single string - might be empty ("")

Examples


 longestCommonSuffix(c("123.ABC", "45677.ABC", "BC"))  ## "BC"
 longestCommonSuffix(c("123.ABC", "", "BC"))           ## ""
 longestCommonSuffix(c("123.ABC", "45677.ABC"))        ## ".ABC"
 longestCommonSuffix(c("nothing", "in", "common"))     ## ""
 

[Package PTXQC version 1.1.1 Index]