find_lcsubstr: Find the longest common substring between elements of a...

Description Usage Arguments Value Examples

Description

Find the longest common substring between elements of a character vector

Usage

1
find_lcsubstr(string, n_min = 1, n_max = NULL, trace = TRUE)

Arguments

string

a character vector.

n_min

integer. Minimum common substring length to find.

n_max

integer. Maximum common substring length to find. Default (NULL) correspond to the length of the smallest string

trace

logical. Should the result be printed in the console ?

Value

a character vector with the longest common substring(s)

Examples

1
2
3
4
st1 <- "Here is a first string for the example, how original !"
st2 <- "Here a second string for the example too."
st3 <- "Here is a third  string for the example, as original as the others."
find_lcsubstr(string = c(st1, st2, st3))

BenjaminLouis/lcsubstr documentation built on May 4, 2019, 2:06 a.m.