SUBSTRING
Substring is a contiguous sequence of characters within a string. If s is a string of length n, then a substring can be written as s[i..j] for indices i and j with 0 <= i <= j < n, or as s[i:j] in languages that use Python-like slicing. The length of the substring is j - i + 1. The empty string is a substring of every string.
Substring is distinguished from subsequence: a substring must be contiguous, whereas a subsequence may skip characters
Common operations include extracting a substring and testing whether one string contains another as a substring.
Algorithms for locating substrings range from simple brute-force scans with O(nm) time to more efficient methods.
Applications include text search, pattern matching, data mining, and DNA sequence analysis. Substrings are also used