MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / endsWith

Method endsWith

vm/JavaAPI/src/java/lang/String.java:250–262  ·  view source on GitHub ↗

Tests if this string ends with the specified suffix.

(java.lang.String suffix)

Source from the content-addressed store, hash-verified

248 * Tests if this string ends with the specified suffix.
249 */
250 public boolean endsWith(java.lang.String suffix){
251 if(suffix.length() > length()) {
252 return false;
253 }
254 int offset = suffix.length() - 1;
255 for(int iter = length() - 1 ; offset >= 0 ; iter--) {
256 if(value[this.offset + iter] != suffix.value[suffix.offset + offset]) {
257 return false;
258 }
259 offset--;
260 }
261 return true;
262 }
263
264 /**
265 * Compares this string to the specified object. The result is true if and only if the argument is not null and is a String object that represents the same sequence of characters as this object.

Callers 15

getChildrenMethod · 0.95
childToDisplayLabelMethod · 0.95
fieldNameMethod · 0.95
typeFromNameMethod · 0.95
getParentMethod · 0.95
discoverMethod · 0.95
resolveUrlMethod · 0.95
getAppHomePathMethod · 0.95
parseMethod · 0.95
looksLikeAngleMethod · 0.95
parseAngleTokenMethod · 0.95
parsePositionCoordMethod · 0.95

Calls 2

lengthMethod · 0.95
lengthMethod · 0.65

Tested by 7

runTestMethod · 0.76
testFileClassMethod · 0.76
extractLastJsonObjectMethod · 0.76
extractJarMethod · 0.76
findTestCasesInDirMethod · 0.76