MCPcopy
hub / github.com/libgdx/libgdx / endsWith

Method endsWith

gdx/src/com/badlogic/gdx/utils/CharArray.java:1420–1428  ·  view source on GitHub ↗

Checks whether this CharArray ends with the specified string. @return true if this CharArray ends with the string

(String str)

Source from the content-addressed store, hash-verified

1418 /** Checks whether this CharArray ends with the specified string.
1419 * @return true if this CharArray ends with the string */
1420 public boolean endsWith (String str) {
1421 int length = str.length();
1422 if (length == 0) return true;
1423 if (length > size) return false;
1424 int pos = size - length;
1425 for (int i = 0; i < length; i++, pos++)
1426 if (items[pos] != str.charAt(i)) return false;
1427 return true;
1428 }
1429
1430 /** Copies this character array into the specified array.
1431 * @param target the target array, null will cause an array to be created

Callers 15

stringComparisonTestMethod · 0.95
searchMethod · 0.80
listMethod · 0.80
listMethod · 0.80
DefaultAndroidFilesMethod · 0.80
initExternalFilesPathMethod · 0.80
newArrayCMethod · 0.80
childMethod · 0.80
fixSlashesMethod · 0.80
toObjectMethod · 0.80
FileMethod · 0.80
listFilesMethod · 0.80

Calls 2

lengthMethod · 0.45
charAtMethod · 0.45

Tested by 3

stringComparisonTestMethod · 0.76
mainMethod · 0.64
traverseMethod · 0.64