< prev index next >
src/share/vm/oops/symbol.hpp
Print this page
@@ -182,11 +182,19 @@
bool starts_with(const char* prefix, int len) const;
bool starts_with(const char* prefix) const {
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));
}
< prev index next >