Leetcode
在程序员的道路上越走越远
6/09/2014
115. Implement strStr()
public class Solution {
public String strStr(String haystack, String needle) {
int index = haystack.indexOf(needle);
if (index<0) return null;
else return haystack.substring(index);
}
}
没有评论:
发表评论
较新的博文
较早的博文
主页
订阅:
博文评论 (Atom)
没有评论:
发表评论