/** * Searches the string builder to find the last reference to the specified char. * * @param ch the character to find * @return the last index of the character, or -1 if not found */ public int lastIndexOf(char ch) { return lastIndexOf(ch, size - 1); }
/** * Searches the string builder using the matcher to find the last match. * <p> * Matchers can be used to perform advanced searching behaviour. * For example you could write a matcher to find the character 'a' * followed by a number. * * @param matcher the matcher to use, null returns -1 * @return the last index matched, or -1 if not found */ public int lastIndexOf(StrMatcher matcher) { return lastIndexOf(matcher, size); }
/** * Searches the string builder to find the last reference to the specified string. * <p> * Note that a null input string will return -1, whereas the JDK throws an exception. * * @param str the string to find, null returns -1 * @return the last index of the string, or -1 if not found */ public int lastIndexOf(String str) { return lastIndexOf(str, size - 1); }
if (strLen > 0 && strLen <= size) { if (strLen == 1) { return lastIndexOf(str.charAt(0), startIndex);
/** * Searches the string builder to find the last reference to the specified char. * * @param ch the character to find * @return the last index of the character, or -1 if not found */ public int lastIndexOf(char ch) { return lastIndexOf(ch, size - 1); }
/** * Searches the string builder to find the last reference to the specified char. * * @param ch the character to find * @return the last index of the character, or -1 if not found */ public int lastIndexOf(char ch) { return lastIndexOf(ch, size - 1); }
/** * Searches the string builder to find the last reference to the specified string. * <p> * Note that a null input string will return -1, whereas the JDK throws an exception. * * @param str the string to find, null returns -1 * @return the last index of the string, or -1 if not found */ public int lastIndexOf(String str) { return lastIndexOf(str, size - 1); }
/** * Searches the string builder to find the last reference to the specified char. * * @param ch the character to find * @return the last index of the character, or -1 if not found */ public int lastIndexOf(char ch) { return lastIndexOf(ch, size - 1); }
/** * Searches the string builder to find the last reference to the specified string. * <p> * Note that a null input string will return -1, whereas the JDK throws an exception. * * @param str the string to find, null returns -1 * @return the last index of the string, or -1 if not found */ public int lastIndexOf(String str) { return lastIndexOf(str, size - 1); }
/** * Searches the string builder to find the last reference to the specified char. * * @param ch the character to find * @return the last index of the character, or -1 if not found */ public int lastIndexOf(char ch) { return lastIndexOf(ch, size - 1); }
/** * Searches the string builder to find the last reference to the specified string. * <p> * Note that a null input string will return -1, whereas the JDK throws an exception. * * @param str the string to find, null returns -1 * @return the last index of the string, or -1 if not found */ public int lastIndexOf(String str) { return lastIndexOf(str, size - 1); }
/** * Searches the string builder using the matcher to find the last match. * <p> * Matchers can be used to perform advanced searching behaviour. * For example you could write a matcher to find the character 'a' * followed by a number. * * @param matcher the matcher to use, null returns -1 * @return the last index matched, or -1 if not found */ public int lastIndexOf(StrMatcher matcher) { return lastIndexOf(matcher, size); }
/** * Searches the string builder using the matcher to find the last match. * <p> * Matchers can be used to perform advanced searching behaviour. * For example you could write a matcher to find the character 'a' * followed by a number. * * @param matcher the matcher to use, null returns -1 * @return the last index matched, or -1 if not found */ public int lastIndexOf(StrMatcher matcher) { return lastIndexOf(matcher, size); }
/** * Searches the string builder using the matcher to find the last match. * <p> * Matchers can be used to perform advanced searching behaviour. * For example you could write a matcher to find the character 'a' * followed by a number. * * @param matcher the matcher to use, null returns -1 * @return the last index matched, or -1 if not found */ public int lastIndexOf(StrMatcher matcher) { return lastIndexOf(matcher, size); }
/** * Searches the string builder to find the last reference to the specified string. * <p> * Note that a null input string will return -1, whereas the JDK throws an exception. * * @param str the string to find, null returns -1 * @return the last index of the string, or -1 if not found */ public int lastIndexOf(String str) { return lastIndexOf(str, size - 1); }
/** * Searches the string builder to find the last reference to the specified char. * * @param ch the character to find * @return the last index of the character, or -1 if not found */ public int lastIndexOf(char ch) { return lastIndexOf(ch, size - 1); }
/** * Searches the string builder to find the last reference to the specified string. * <p> * Note that a null input string will return -1, whereas the JDK throws an exception. * * @param str the string to find, null returns -1 * @return the last index of the string, or -1 if not found */ public int lastIndexOf(String str) { return lastIndexOf(str, size - 1); }
/** * Searches the string builder using the matcher to find the last match. * <p> * Matchers can be used to perform advanced searching behaviour. * For example you could write a matcher to find the character 'a' * followed by a number. * * @param matcher the matcher to use, null returns -1 * @return the last index matched, or -1 if not found */ public int lastIndexOf(StrMatcher matcher) { return lastIndexOf(matcher, size); }
/** * Searches the string builder using the matcher to find the last match. * <p> * Matchers can be used to perform advanced searching behaviour. * For example you could write a matcher to find the character 'a' * followed by a number. * * @param matcher the matcher to use, null returns -1 * @return the last index matched, or -1 if not found */ public int lastIndexOf(StrMatcher matcher) { return lastIndexOf(matcher, size); }
if (strLen > 0 && strLen <= size) { if (strLen == 1) { return lastIndexOf(str.charAt(0), startIndex);