MCPcopy Index your code
hub / github.com/apache/tomcat / endsWith

Method endsWith

java/org/apache/tomcat/util/buf/CharChunk.java:628–641  ·  view source on GitHub ↗

Checks if the buffer ends with the specified string. @param s the string to check @return true if the buffer ends with the specified string

(String s)

Source from the content-addressed store, hash-verified

626 * @return true if the buffer ends with the specified string
627 */
628 public boolean endsWith(String s) {
629 char[] c = buff;
630 int len = s.length();
631 if (c == null || len > end - start) {
632 return false;
633 }
634 int off = end - len;
635 for (int i = 0; i < len; i++) {
636 if (c[off++] != s.charAt(i)) {
637 return false;
638 }
639 }
640 return true;
641 }
642
643
644 @Override

Callers 15

testEndsWithMethod · 0.95
testBug56581Method · 0.80
willDecodeMethod · 0.80
testFormatReturnsGMTMethod · 0.80
doTestDirectoryMethod · 0.80
testJarsToSkipFormatMethod · 0.80
connectWebSocketMethod · 0.80
testEmptyWindowMethod · 0.80

Calls 2

lengthMethod · 0.80
charAtMethod · 0.80

Tested by 15

testEndsWithMethod · 0.76
testBug56581Method · 0.64
willDecodeMethod · 0.64
testFormatReturnsGMTMethod · 0.64
doTestDirectoryMethod · 0.64
testJarsToSkipFormatMethod · 0.64
connectWebSocketMethod · 0.64
testEmptyWindowMethod · 0.64