For faster navigation, this Iframe is preloading the Wikiwand page for 子串.

子串

一个字符串 被称作另一个字符串 子串,表示 中出现了。比如,“中出”是“我们中出了一个叛徒”的子串。注意子串和子序列是不同的:“果机”是“蘋果手机”的子序列,而不是子串。

前缀后缀是两种特殊的子串:一个前缀在原串的开始位置出现,而一个后缀在原串的末端出现。

例如,“苹果手机”的所有子串是:“”(空串),“苹”,“果”,“手”,“机”,“苹果”,“果手”,“手机”,“苹果手”,“果手机”,“苹果手机”。

定义

一个字符串 被称作另一个字符串 子串,表示

一个字符串 被称作另一个字符串 前缀,表示

一个字符串 被称作另一个字符串 后缀,表示

Border

一个字符串 被称作 Border,表示 既是 的前缀,又是其后缀。比如,“我不相信你”是“我不相信你不认为我不相信你”的 Border,"niconi"是"niconiconi"的 Border。[1]

参考文献

  1. ^ Knuth, D.; Morris, Jr., J.; Pratt, V. Fast Pattern Matching in Strings. SIAM Journal on Computing. 1977-06-01, 6 (2): 323–350 [2018-02-28]. ISSN 0097-5397. doi:10.1137/0206024. (原始内容存档于2021-03-08). 
{{bottomLinkPreText}} {{bottomLinkText}}
子串
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?