diff --git a/kala-base/src/main/java/kala/text/StringSlice.java b/kala-base/src/main/java/kala/text/StringSlice.java index 37392153..86753bb0 100644 --- a/kala-base/src/main/java/kala/text/StringSlice.java +++ b/kala-base/src/main/java/kala/text/StringSlice.java @@ -219,6 +219,10 @@ public int indexOf(int ch, int fromIndex) { return idx >= offset && idx < offset + length ? idx - offset : -1; } + public boolean contains(char ch) { + return indexOf(ch) >= 0; + } + public boolean contains(String other) { int idx = value.indexOf(other, offset); return idx >= 0 && idx <= offset + length - other.length();