powered by
Removes the longest common suffix (LCS) from a vector of strings.
delLCS(x)
Shortened vector of strings
Vector of strings with common suffix
delLCS(c("TK12345_H1")) ## "" delLCS(c("TK12345_H1", "TK12345_H2")) ## "TK12345_H1" "TK12345_H2" delLCS(c("TK12345_H1", "TK12!45_H1")) ## "TK123" "TK12!"
Run the code above in your browser using DataLab