suffixPrefixMatches

Find all suffixes of stringA that are a prefix of stringB. The matches are computed lazily, decreasing length of the match.

suffixPrefixMatches
(
alias pred = "a == b"
C
)
(,)

Return Value

Type: auto

lazily computed range of all suffixes of stringA that are a prefix of stringB.

Examples

auto matches = suffixPrefixMatches("abcdef", "cdefghij");

assert(equal(matches, ["cdef"]));
auto matches = suffixPrefixMatches("abcdefcdef", "cdefcdefghij");

assert(equal(matches, ["cdefcdef", "cdef"]));

Meta