Content deleted Content added
→top: "apple" is a substring of itself |
FlaxenHobbit (talk | contribs) Removed double formatting per MOS:WAW. Tags: Reverted Mobile edit Mobile web edit Advanced mobile edit |
||
Line 1:
{{About|the definition of a substring|the computer function which performs this operation|String functions (programming)}}
{{Distinguish|text=[[subsequence]], a generalization of substring}}
[[File:Substring.png|thumb|"
In [[Formal language|formal language theory]] and [[computer science]], a '''substring''' is a contiguous sequence of [[Character (computing)|character]]s within a [[String (computer science)|string]]<!-- Needs a citation. -->.{{Citation needed|date=July 2021}} For instance, "
'''Prefixes''' and '''suffixes''' are special cases of substrings. A prefix of a string <math>S</math> is a substring of <math>S</math> that occurs at the beginning of <math>S</math>; likewise, a suffix of a string <math>S</math> is a substring that occurs at the end of <math>S</math>.
The substrings of the string "
"
"
"
"
"
(note the [[empty string]] at the end).
|