Enumerate all substrings of a string.

enumerate.substrings(string)

Arguments

string

a character string

Value

a vector containing all substrings of the string (including duplicates)

Examples

enumerate.substrings("abccc")
#> [1] "a" "ab" "abc" "abcc" "abccc" "b" "bc" "bcc" "bccc" #> [10] "c" "cc" "ccc" "c" "cc" "c"