Prefix (computer science)
Appearance
A prefix of a string is a string such that , where . A proper prefix of a string is not equal to the string itself and not empty[1] (). A prefix can be seen as a special case of a substring.
Example
The string ban
is a prefix of the string banana
:
T = banana ||| P = ban
See also
References
- ^ Gusfield, Dan (1999) [1997]. Algorithms on Strings, Trees and Sequences: Computer Science and Computational Biology. USA: Cambridge University Press. ISBN 0-521-58519-8.