page_title: Substring
hierarchical_section_title: Substring
caption_attribution_description: English: A depiction of a substring within a string
context_page_description: In formal language theory and computer science, a substring is a contiguous sequence of characters within a string. For instance, "the best of" is a substring of "It was the best of times". This is not to be confused with subsequence, which is a generalization of substring. For example, "Itwastimes" is a subsequence of "It was the best of times", but not a substring.
  Prefixes and suffixes are special cases of substrings. A prefix of a string is a substring of that occurs at the beginning of; likewise, a suffix of a string is a substring that occurs at the end of.
  The list of all substrings of the string "apple" would be "apple", "appl", "pple", "app", "ppl", "ple", "ap", "pp", "pl", "le", "a", "p", "l", "e", "".
context_section_description: In formal language theory and computer science, a substring is a contiguous sequence of characters within a string. For instance, "the best of" is a substring of "It was the best of times". This is not to be confused with subsequence, which is a generalization of substring. For example, "Itwastimes" is a subsequence of "It was the best of times", but not a substring.
  Prefixes and suffixes are special cases of substrings. A prefix of a string  is a substring of  that occurs at the beginning of ; likewise, a suffix of a string  is a substring that occurs at the end of .
  The list of all substrings of the string "apple" would be "apple", "appl", "pple", "app", "ppl", "ple", "ap", "pp", "pl", "le", "a", "p", "l", "e", "" (note the empty string at the end).
caption: "string" is a substring of "substring"
exif: {}