Definition:Substring

Definition
Let $\LL$ be a formal language with alphabet $\AA$.

Let $S$ be a string in $\AA$.

Let $T$ be a string in $\AA$ such that:
 * $S = S_1 T S_2$

where:
 * $S_1$ and $S_2$ are strings in $\AA$ (possibly null)
 * $S_1 T S_2$ is the concatenation of $S_1$, $T$ and $S_2$.

Then $T$ is called a substring of $S$.

Also see

 * String is Substring of Itself


 * Prefix of String is Substring