摘要: 本题是要实现类似String的indexOf方法。即对于字符串str和pattern, 在str中找到第一个与pattern匹配的子串并返回该子串的第一个字符的位置,如果找不到则返回 -1。 通过Sunday方法,sunday方法通过偏移数组offset来确定如果当前子串str[index .. i 阅读全文
posted @ 2021-01-11 21:36 wflying 阅读(48) 评论(0) 推荐(0)