问题描述
查找一些文本和一个C字符串中的新文本替换它可以是一个有点棘手超过预期。我seaching算法快,即时间complexitiy是如此之小。随意,分享你的意见时,
Finding some text and replacing it with new text within a C string can be a little trickier than expected.I am seaching algorithm which is fast ,that is time complexitiy is so small.Feel free, when share your opinion
推荐答案
我不禁想知道算法的strstr()实现。鉴于这些是相当标准的算法,这是完全有可能是一个很好的执行的strstr()的使用其中之一。
I can't help but wonder what algorithm strstr() implements. Given that these are fairly standard algorithms, it's entirely possible that a good implementation of strstr() uses one of them.
但是没有保证的strstr()实现了一个优化的算法,或者说,同样的算法是从一个平台用于另一回事。
However there's no guarantee that strstr() implements an optimised algorithm or that the same algorithm is used from one platform to another.
这篇关于对于字符串,查找和替换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!