Substring: Difference between revisions

Content deleted Content added
m Suffix: Reference after period
m top: Fix capitalization. Improve formatting of Wikitext while I'm here.
Line 1:
{{About|the definition of a substring|the computer function which performs this operation|String functions (programming)}}
{{Distinguish|text=[[Subsequencesubsequence]], a generalization of substring}}
[[File:Substring.png|thumb|"''string''" is a substring of "''substring''"]]
 
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, "''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.