字符串搜索算法使用string :: find()c ++

编程入门 行业动态 更新时间:2024-10-19 12:47:57
本文介绍了字符串搜索算法使用string :: find()c ++的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

它如何比cstring函数快?是类似的源C?

how its faster than cstring functions? is the similar source available for C?

推荐答案

没有C ++标准库的标准实现,但你应该能够看看你的编译器附带的实现,看看它是如何工作的自己。

There's no standard implementation of the C++ Standard Library, but you should be able to take a look at the implementation shipped with your compiler and see how it works yourself.

一般来说,大多数STL函数不比它们的C对应的速度更快。它们通常更安全,更一般化,并设计为适应比狭义目的C等同物更广泛的情况。

In general, most STL functions are not faster than their C counterparts, though. They're usually safer, more generalized and designed to accommodate a much broader range of circumstances than the narrow-purpose C equivalents.

更多推荐

字符串搜索算法使用string :: find()c ++

本文发布于:2023-11-29 16:25:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1646936.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:字符串   算法   find   string

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!