Jump to content

Prefix (computer science)

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by YurikBot (talk | contribs) at 11:19, 8 April 2006 (robot Adding: ru:Префикс (информатика)). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

A prefix of a string is a string such that , where . A proper prefix of a string is 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.