Skip to content

Commit

Permalink
endsWith -> suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
larsgrefer authored Dec 7, 2016
1 parent a99faff commit 032ad99
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions okio/src/main/java/okio/ByteString.java
Original file line number Diff line number Diff line change
Expand Up @@ -394,12 +394,12 @@ public final boolean startsWith(byte[] prefix) {
return rangeEquals(0, prefix, 0, prefix.length);
}

public final boolean endsWith(ByteString prefix) {
return rangeEquals(size() - prefix.size(), prefix, 0, prefix.size());
public final boolean endsWith(ByteString suffix) {
return rangeEquals(size() - suffix.size(), suffix, 0, suffix.size());
}

public final boolean endsWith(byte[] prefix) {
return rangeEquals(size() - prefix.length, prefix, 0, prefix.length);
public final boolean endsWith(byte[] suffix) {
return rangeEquals(size() - suffix.length, suffix, 0, suffix.length);
}

public final int indexOf(ByteString other) {
Expand Down

0 comments on commit 032ad99

Please sign in to comment.