Substring
Subsequence of the symbols in a string, where the order of the elements is preserved
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". In contrast, "Itwastimes" is a subsequence of "It was the best of times", but not a substring.
Nº Q2626534 ★
Common · Knowledge
Substring
Subsequence of the symbols in a string, where the order of the elements is preserved
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". In contrast, "Itwastimes" is a subsequence of "It was the best of times", but not a substring.
From Wikipedia
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". In contrast, "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 S {\displaystyle S} is a substring of S {\displaystyle S} that occurs at the beginning of S {\displaystyle S} ; likewise, a suffix of a string S {\displaystyle S} is a substring that occurs at the end of S {\displaystyle S} . The substrings of the string "apple" would be: "a", "ap", "app", "appl", "apple", "p", "pp", "ppl", "pple", "pl", "ple", "l", "le" "e", "" (note the empty string at the end).
Text: Wikipédia, CC BY-SA 4.0. · Image: Turbo pencil (CC0) ·
Related cards
-
S
Subsequence
Binary relation between sequences (strings)
Nº Q1332977 ★
Not listed
-
Suffix automaton
Minimal DFA accepting set of all suffixes of particular string
Nº Q19599738 ★
Not listed
-
String (computer science)
Data type representing a finite sequence of encoded characters
Nº Q184754 ★★
Not listed
-
A
Adposition
Class of words used to express spatial or temporal relations or mark various semantic roles
Nº Q134316 ★
Not listed
-
F
Final form
Conditional form of a grapheme at the end of a word
Nº Q5449465 ★★★★
Not listed
-
Longest common subsequence
The problem of finding a sequence that is a subsequence of each of a given set of sequences and is as long as possible
Nº Q141001 ★
Not listed