/** * Returns the last index of the code point {@code c}, or -1. * The search for the character starts at the end and moves towards the * beginning of this string. */ public int lastIndexOf(int c) { if (c > 0xffff) { return lastIndexOfSupplementary(c, Integer.MAX_VALUE); } int _count = count; int _offset = offset; char[] _value = value; for (int i = _offset + _count - 1; i >= _offset; --i) { if (_value[i] == c) { return i - _offset; } } return -1; }
/** * Returns the last index of the code point {@code c}, or -1. * The search for the character starts at offset {@code start} and moves towards * the beginning of this string. */ public int lastIndexOf(int c, int start) { if (c > 0xffff) { return lastIndexOfSupplementary(c, start); } int _count = count; int _offset = offset; char[] _value = value; if (start >= 0) { if (start >= _count) { start = _count - 1; } for (int i = _offset + start; i >= _offset; --i) { if (_value[i] == c) { return i - _offset; } } } return -1; }
/** * Returns the last index of the code point {@code c}, or -1. * The search for the character starts at the end and moves towards the * beginning of this string. */ public int lastIndexOf(int c) { if (c > 0xffff) { return lastIndexOfSupplementary(c, Integer.MAX_VALUE); } int _count = count; int _offset = offset; char[] _value = value; for (int i = _offset + _count - 1; i >= _offset; --i) { if (_value[i] == c) { return i - _offset; } } return -1; }
/** * Returns the last index of the code point {@code c}, or -1. * The search for the character starts at the end and moves towards the * beginning of this string. */ public int lastIndexOf(int c) { if (c > 0xffff) { return lastIndexOfSupplementary(c, Integer.MAX_VALUE); } int _count = count; int _offset = offset; char[] _value = value; for (int i = _offset + _count - 1; i >= _offset; --i) { if (_value[i] == c) { return i - _offset; } } return -1; }
/** * Returns the last index of the code point {@code c}, or -1. * The search for the character starts at the end and moves towards the * beginning of this string. */ public int lastIndexOf(int c) { if (c > 0xffff) { return lastIndexOfSupplementary(c, Integer.MAX_VALUE); } int _count = count; int _offset = offset; char[] _value = value; for (int i = _offset + _count - 1; i >= _offset; --i) { if (_value[i] == c) { return i - _offset; } } return -1; }
/** * Returns the last index of the code point {@code c}, or -1. * The search for the character starts at the end and moves towards the * beginning of this string. */ public int lastIndexOf(int c) { if (c > 0xffff) { return lastIndexOfSupplementary(c, Integer.MAX_VALUE); } int _count = count; int _offset = offset; char[] _value = value; for (int i = _offset + _count - 1; i >= _offset; --i) { if (_value[i] == c) { return i - _offset; } } return -1; }
/** * Returns the last index of the code point {@code c}, or -1. * The search for the character starts at the end and moves towards the * beginning of this string. */ public int lastIndexOf(int c) { if (c > 0xffff) { return lastIndexOfSupplementary(c, Integer.MAX_VALUE); } int _count = count; int _offset = offset; char[] _value = value; for (int i = _offset + _count - 1; i >= _offset; --i) { if (_value[i] == c) { return i - _offset; } } return -1; }
/** * Returns the last index of the code point {@code c}, or -1. * The search for the character starts at offset {@code start} and moves towards * the beginning of this string. */ public int lastIndexOf(int c, int start) { if (c > 0xffff) { return lastIndexOfSupplementary(c, start); } int _count = count; int _offset = offset; char[] _value = value; if (start >= 0) { if (start >= _count) { start = _count - 1; } for (int i = _offset + start; i >= _offset; --i) { if (_value[i] == c) { return i - _offset; } } } return -1; }
/** * Returns the last index of the code point {@code c}, or -1. * The search for the character starts at the end and moves towards the * beginning of this string. */ public int lastIndexOf(int c) { if (c > 0xffff) { return lastIndexOfSupplementary(c, Integer.MAX_VALUE); } int _count = count; int _offset = offset; char[] _value = value; for (int i = _offset + _count - 1; i >= _offset; --i) { if (_value[i] == c) { return i - _offset; } } return -1; }
/** * Returns the last index of the code point {@code c}, or -1. * The search for the character starts at offset {@code start} and moves towards * the beginning of this string. */ public int lastIndexOf(int c, int start) { if (c > 0xffff) { return lastIndexOfSupplementary(c, start); } int _count = count; int _offset = offset; char[] _value = value; if (start >= 0) { if (start >= _count) { start = _count - 1; } for (int i = _offset + start; i >= _offset; --i) { if (_value[i] == c) { return i - _offset; } } } return -1; }
/** * Returns the last index of the code point {@code c}, or -1. * The search for the character starts at offset {@code start} and moves towards * the beginning of this string. */ public int lastIndexOf(int c, int start) { if (c > 0xffff) { return lastIndexOfSupplementary(c, start); } int _count = count; int _offset = offset; char[] _value = value; if (start >= 0) { if (start >= _count) { start = _count - 1; } for (int i = _offset + start; i >= _offset; --i) { if (_value[i] == c) { return i - _offset; } } } return -1; }
/** * Returns the last index of the code point {@code c}, or -1. * The search for the character starts at offset {@code start} and moves towards * the beginning of this string. */ public int lastIndexOf(int c, int start) { if (c > 0xffff) { return lastIndexOfSupplementary(c, start); } int _count = count; int _offset = offset; char[] _value = value; if (start >= 0) { if (start >= _count) { start = _count - 1; } for (int i = _offset + start; i >= _offset; --i) { if (_value[i] == c) { return i - _offset; } } } return -1; }
/** * Returns the last index of the code point {@code c}, or -1. * The search for the character starts at offset {@code start} and moves towards * the beginning of this string. */ public int lastIndexOf(int c, int start) { if (c > 0xffff) { return lastIndexOfSupplementary(c, start); } int _count = count; int _offset = offset; char[] _value = value; if (start >= 0) { if (start >= _count) { start = _count - 1; } for (int i = _offset + start; i >= _offset; --i) { if (_value[i] == c) { return i - _offset; } } } return -1; }
/** * Returns the last index of the code point {@code c}, or -1. * The search for the character starts at offset {@code start} and moves towards * the beginning of this string. */ public int lastIndexOf(int c, int start) { if (c > 0xffff) { return lastIndexOfSupplementary(c, start); } int _count = count; int _offset = offset; char[] _value = value; if (start >= 0) { if (start >= _count) { start = _count - 1; } for (int i = _offset + start; i >= _offset; --i) { if (_value[i] == c) { return i - _offset; } } } return -1; }