--- old/src/share/vm/oops/symbol.hpp 2016-09-28 08:26:24.000000000 -0700 +++ new/src/share/vm/oops/symbol.hpp 2016-09-28 08:26:23.000000000 -0700 @@ -184,7 +184,15 @@ return starts_with(prefix, (int) strlen(prefix)); } - // Tests if the symbol starts with the given prefix. + // Tests if the symbol ends with the given suffix. + bool ends_with(const char* suffix, int len) const; + bool ends_with(const char* suffix) const { + return ends_with(suffix, (int) strlen(suffix)); + } + + // Returns index of the given substring in the symbol, starting + // at index 'i'. + // If the symbol doesn't contain the given substring, return -1. int index_of_at(int i, const char* str, int len) const; int index_of_at(int i, const char* str) const { return index_of_at(i, str, (int) strlen(str));