摘要: 该函数用于判断needle是否为haystack的子串,如果是,则返回needle在haystack中首次出现的索引。如果不存在,返回 1。 int strstr(string haystack, string needle) { int h = haystack.size(); int n = n 阅读全文
posted @ 2018-02-09 09:15 一棵球和一枝猪 阅读(575) 评论(0) 推荐(0) 编辑