equal
deleted
inserted
replaced
2117 * @param s the sequence to search for |
2117 * @param s the sequence to search for |
2118 * @return true if this string contains {@code s}, false otherwise |
2118 * @return true if this string contains {@code s}, false otherwise |
2119 * @since 1.5 |
2119 * @since 1.5 |
2120 */ |
2120 */ |
2121 public boolean contains(CharSequence s) { |
2121 public boolean contains(CharSequence s) { |
2122 return indexOf(s.toString()) > -1; |
2122 return indexOf(s.toString()) >= 0; |
2123 } |
2123 } |
2124 |
2124 |
2125 /** |
2125 /** |
2126 * Replaces the first substring of this string that matches the given <a |
2126 * Replaces the first substring of this string that matches the given <a |
2127 * href="../util/regex/Pattern.html#sum">regular expression</a> with the |
2127 * href="../util/regex/Pattern.html#sum">regular expression</a> with the |