diff --git a/src/main/java/org/cactoos/text/SuffixOf.java b/src/main/java/org/cactoos/text/SuffixOf.java index 6ee56bde9..ce775838d 100644 --- a/src/main/java/org/cactoos/text/SuffixOf.java +++ b/src/main/java/org/cactoos/text/SuffixOf.java @@ -54,6 +54,7 @@ public SuffixOf(final CharSequence text, final CharSequence boundary) { public SuffixOf(final Text text, final CharSequence boundary) { this(text, new TextOf(boundary)); } + /** * Ctor. * @param text Text representing the text value @@ -67,7 +68,8 @@ public SuffixOf(final Text text, final Text boundary) { (Text t) -> t.asString().indexOf(boundary.asString()) >= 0, t -> new Sub( t, - s -> s.indexOf(boundary.asString()) + new LengthOf(boundary).value().intValue() + s -> s.indexOf(boundary.asString()) + + new LengthOf(boundary).value().intValue() ), t -> new TextOf("") )