Suffix of String is Substring
Jump to navigation
Jump to search
Theorem
Let $S$ be a string.
Let $T$ be a suffix of $S$.
Then $T$ is a substring of $S$.
Proof
By definition of substring, there exists a string $T'$ such that:
- $S = T'T$
Hence $S$ is the concatenation of the null string, $T'$, and $T$.
Thus by definition of substring, $T$ is a substring of $S$.
$\blacksquare$