< prev index next >
src/hotspot/share/utilities/utf8.cpp
Print this page
rev 58452 : imported patch pkg_name_from_class
@@ -304,20 +304,10 @@
}
return buffer;
}
#endif // !PRODUCT
-// Returns NULL if 'c' it not found. This only works as long
-// as 'c' is an ASCII character
-const jbyte* UTF8::strrchr(const jbyte* base, int length, jbyte c) {
- assert(length >= 0, "sanity check");
- assert(c >= 0, "does not work for non-ASCII characters");
- // Skip backwards in string until 'c' is found or end is reached
- while(--length >= 0 && base[length] != c);
- return (length < 0) ? NULL : &base[length];
-}
-
bool UTF8::equal(const jbyte* base1, int length1, const jbyte* base2, int length2) {
// Length must be the same
if (length1 != length2) return false;
for (int i = 0; i < length1; i++) {
if (base1[i] != base2[i]) return false;
< prev index next >