LeetCode 28. Implement strStr()

来源:互联网 发布:千里眼淘宝插件 编辑:程序博客网 时间:2024/05/17 09:37
public class Solution {    public int strStr(String haystack, String needle) {        if(needle.length()==0 && haystack.length()==0)        return 0;        return haystack.indexOf(needle,0);                   }}

0 0