Implement strStr().
Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack.
本文介绍了一个简单的strStr()函数实现方法,该方法用于在haystack字符串中查找needle字符串首次出现的位置。通过逐字符比较的方式进行搜索,若找到则返回对应位置指针,否则返回null。
Implement strStr().
Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack.

被折叠的 条评论
为什么被折叠?
