Package Torello.Java

Class StrTokIndexOf


  • public class StrTokIndexOf
    extends java.lang.Object
    Automatic Code-Generator:
    The code in this class was automatically built using a code-generator. The source-code for this generator may be viewed in the link below. It is somewhat simplistic, in that Java String's and StringBuilder's are used. It did get the job done.

    TokIndexOfCodeGen.java

    This code was developed over two years ago (2020), and has not changed much.
    The purpose of this class is to help find the location of Token-Matches inside of an input source-String.

    StrTokIndexOf =>

    1. StrTok: Token-Matches are substring matches which are found inside a supplied 'srcStr'. These matches must be both fully contained within 'srcStr', and have "match locations" (String-index position in 'srcStr' where the token matches) that are bounded / 'surrounded' by either white-space (space-character '#32', '\n', '\r', etc ) or by characters that pass a user supplied Character-Predicate test().

    2. IndexOf: Each of the methods in this class shall return an integer, or int[] array of indices into the input String 'srcStr' where match-locations were found.



    Normally, checking for an occurrence of a substring inside of a Java String is as easy as calling the method String.contains(substring). Problems can crop up, however, when working with String's whose contents have derived from HTML-Attributes.

    For instance, when working with the HTML Element Attribute 'CLASS=...', simply making a call to String.contains(cssClassName) to find if it is a member of 'cssClassName' would return many incorrect results due to the fact that the cssClassName - if occurring within the list of CSS Classes - is only considered a match if that class-name is bounded on both sides by white-space or the start (or end) of the CSS 'CLASS' Attribute-Value. This StrTokIndexOf is nearly identical to the class with the similarly chosen name StrIndexOf; but differs in that the matches it finds are only considered matches when the sub-string the logic is searching is found, by itself, like a separate word in the String being searched.

    The following examples will hopefully make more clear what a Token-Match actually is:

    Example:
    int pos = StrTokIndexOf.first("This is a warm, sunny afternoon in August.", "war");
    // 'pos' would evaluate to -1, because 'war' was not found as a token.  HOWEVER...
    
    int pos = StrIndexOf.first("This is a warm, sunny afternoon in August.", "war");
    // 'pos' would evaluate to 10, because the word 'warm' begins with 'war' and the
    // first letter of 'warm' is located at string-index 10.
    
    TagNode tn          = new TagNode("<DIV CLASS='PersonalPics' ID='Photos-10'>");
    String  cssClass    = "Pics";
    
    boolean found       = StrTokIndexOf.first(tn.AV("class"), cssClass) != -1;
    // 'found' would evaluate to FALSE, because though 'PersonalPics' contains the substring
    // 'Pics', it is not an actually CSS Class String match.  The concept of "Token-Match" is 
    // identical to how CSS Parsers look for Class String's
    
    // NOTE:
    boolean found       = StrIndexOf.first(tn.AV("class"), cssClass) != -1;
    // 'found' would evaluate to TRUE, because 'Pics' is a substring of 'PersonalPics'
    // but this would be a mistake since, as a CSS class, this token is not really one of the
    // CSS Classes contained by the HTML divider element.
    

    Methods Available

    Method Explanation
    first (...) This will retrieve an integer-pointer that points to the first String-Token match found within the input String-parameter 'srcStr'.
    nth (...) This will retrieve an integer-pointer that points to the nth String-Token match found within the input String-parameter 'srcStr'.
    last (...) This will retrieve an integer-pointer that points to the last String-Token match found within the input String-parameter 'srcStr'.
    nthFromEnd (...) This will retrieve an integer-pointer that points to the nth-from-last String-Token match found within the input String-parameter 'srcStr'.
    all (...) This will retrieve an integer-pointer to every String-Token match found within the input String-parameter 'srcStr'.

    Method Parameters

    Parameter Explanation
    String srcStr This parameter is mandatory for every method here. It is the source String that is being searched. Every method is designed to iterate through the characters in this String, searching for matches of String or char parameter 'token'.
    int nth This represents the 'nth' match of a comparison for-loop. When the method-signature used includes the parameter 'nth' , the first n-1 matches that are found - will be skipped, and the 'nth' match is, instead, returned.

    EXCEPTIONS: An NException shall throw if the value of parameter 'nth' is zero, negative, or larger than the size of the input html-Vector.
    int sPos, int ePos When these parameters are present, only substring's that are found between these specified String indices will be considered when returning results from StrTokIndexOf.

    NOTE: In every situation where the parameters int sPos, int ePos are used, parameter 'ePos' will accept a negative value, but parameter 'sPos' will not. When 'ePos' is passed a negative-value, the internal LV ('Loop Variable Counter') will have its public final int end field set to the length of the 'srcStr' parameter String.

    EXCEPTIONS: An IndexOutOfBoundsException will be thrown if:

    • If sPos is negative, or if sPos is greater-than or equal-to the size of 'srcStr'
    • If ePos is zero, or greater than the size 'srcStr'.
    • If sPos is a larger integer than ePos
    String token This is the testing-substring that is this class' search goal. When this String is identified as a substring of the input-parameter String 'srcStr', a potential match has been found. In order for potential matches to be returned as results, they are subsequently tested for surrounding white-space (or the additional 'extraDelimiterTest'). The requirements for a potential match to be returned as a Token Match are as follows:

    1. The location of 'token' in 'srcStr' must be bounded by white-space, or be located at the very beginning or ending of the 'srcStr'.
    2. If an extraDelimiterTest has been provided, the location of 'token' in 'srcStr' may also be bounded by characters that are a match with the Character-Predicate 'test(char)' method.
    3. And, of course, the 'token' must be a substring of 'srcStr'
    char token This parameter is used indentically to parameter String token. However, rather than searching for sub-string matches, the search-loops are looking for copies of character 'token'. All the rules listed in the previous parameter entry (above) apply to this parameter too.
    Predicate<Character> extraDelimiterTest When this parameter is present in the method-signature parameter-list, the decision of whether a Token-Match is to be included in the search result-set can be made less restrictive. Usually, a match must be delimited by white-space; meaning that the characters directly before and after the match location in 'srcStr' must be white-space, or the String terminus (Regex: '^' and '$').

    However, when this parameter is part of a method signature, the method body in this class that implements this search will also permit a token-match location to be bounded by characters that pass this Character-Predicate's Predicate.test(char) method.

    For instance, if (Character c) -> ",.!?()".contains("" + c) were passed to this parameter, then: commas, periods, exclamation-points, question-marks, and parenthesis would all be allowed directly before or immediately after the token-match location of the 'token' parameter inside String 'srcStr'.

    Return Values:

    1. int represents a position index of String parameter 'srcStr'.
    2. A return value of -1 implies no matches were found.
    3. int[] A list of position indices where token-matches were found.
    4. A zero-length int[] array means no matches were found in 'srcStr'. Zero-length arrays are returned from any method where the possibility existed for multiple-matches being provided as a result-set. Null will not be returned.



    Stateless Class:
    This class neither contains any program-state, nor can it be instantiated. The @StaticFunctional Annotation may also be called 'The Spaghetti Report'. Static-Functional classes are, essentially, C-Styled Files, without any constructors or non-static member fields. It is a concept very similar to the Java-Bean's @Stateless Annotation.

    • 1 Constructor(s), 1 declared private, zero-argument constructor
    • 96 Method(s), 96 declared static
    • 0 Field(s)


    • Method Summary

       
      All
      Modifier and Type Method
      static int[] all​(String srcStr, char c)
      static int[] all​(String srcStr, String token)
      static int[] all_CI​(String srcStr, char c)
      static int[] all_CI​(String srcStr, String token)
       
      All, Range-Limited
      Modifier and Type Method
      static int[] all​(String srcStr, int sPos, int ePos, char c)
      static int[] all​(String srcStr, int sPos, int ePos, String token)
      static int[] all_CI​(String srcStr, int sPos, int ePos, char c)
      static int[] all_CI​(String srcStr, int sPos, int ePos, String token)
       
      All w/ Extra-Delimiter Test
      Modifier and Type Method
      static int[] all​(String srcStr, char c, Predicate<Character> extraDelimiterTest)
      static int[] all​(String srcStr, String token, Predicate<Character> extraDelimiterTest)
      static int[] all_CI​(String srcStr, char c, Predicate<Character> extraDelimiterTest)
      static int[] all_CI​(String srcStr, String token, Predicate<Character> extraDelimiterTest)
       
      All, Range-Limited w/ Extra-Delimiter Test
      Modifier and Type Method
      static int[] all​(String srcStr, int sPos, int ePos, char c, Predicate<Character> extraDelimiterTest)
      static int[] all​(String srcStr, int sPos, int ePos, String token, Predicate<Character> extraDelimiterTest)
      static int[] all_CI​(String srcStr, int sPos, int ePos, char c, Predicate<Character> extraDelimiterTest)
      static int[] all_CI​(String srcStr, int sPos, int ePos, String token, Predicate<Character> extraDelimiterTest)
       
      First
      Modifier and Type Method
      static int first​(String srcStr, char c)
      static int first​(String srcStr, String token)
      static int first_CI​(String srcStr, char c)
      static int first_CI​(String srcStr, String token)
       
      First, Range-Limited
      Modifier and Type Method
      static int first​(String srcStr, int sPos, int ePos, char c)
      static int first​(String srcStr, int sPos, int ePos, String token)
      static int first_CI​(String srcStr, int sPos, int ePos, char c)
      static int first_CI​(String srcStr, int sPos, int ePos, String token)
       
      First w/ Extra-Delimiter Test
      Modifier and Type Method
      static int first​(String srcStr, char c, Predicate<Character> extraDelimiterTest)
      static int first​(String srcStr, String token, Predicate<Character> extraDelimiterTest)
      static int first_CI​(String srcStr, char c, Predicate<Character> extraDelimiterTest)
      static int first_CI​(String srcStr, String token, Predicate<Character> extraDelimiterTest)
       
      First, Range-Limited w/ Extra-Delimiter Test
      Modifier and Type Method
      static int first​(String srcStr, int sPos, int ePos, char c, Predicate<Character> extraDelimiterTest)
      static int first​(String srcStr, int sPos, int ePos, String token, Predicate<Character> extraDelimiterTest)
      static int first_CI​(String srcStr, int sPos, int ePos, char c, Predicate<Character> extraDelimiterTest)
      static int first_CI​(String srcStr, int sPos, int ePos, String token, Predicate<Character> extraDelimiterTest)
       
      Last
      Modifier and Type Method
      static int last​(String srcStr, char c)
      static int last​(String srcStr, String token)
      static int last_CI​(String srcStr, char c)
      static int last_CI​(String srcStr, String token)
       
      Last, Range-Limited
      Modifier and Type Method
      static int last​(String srcStr, int sPos, int ePos, char c)
      static int last​(String srcStr, int sPos, int ePos, String token)
      static int last_CI​(String srcStr, int sPos, int ePos, char c)
      static int last_CI​(String srcStr, int sPos, int ePos, String token)
       
      Last w/ Extra-Delimiter Test
      Modifier and Type Method
      static int last​(String srcStr, char c, Predicate<Character> extraDelimiterTest)
      static int last​(String srcStr, String token, Predicate<Character> extraDelimiterTest)
      static int last_CI​(String srcStr, char c, Predicate<Character> extraDelimiterTest)
      static int last_CI​(String srcStr, String token, Predicate<Character> extraDelimiterTest)
       
      Last, Range-Limited w/ Extra-Delimiter Test
      Modifier and Type Method
      static int last​(String srcStr, int sPos, int ePos, char c, Predicate<Character> extraDelimiterTest)
      static int last​(String srcStr, int sPos, int ePos, String token, Predicate<Character> extraDelimiterTest)
      static int last_CI​(String srcStr, int sPos, int ePos, char c, Predicate<Character> extraDelimiterTest)
      static int last_CI​(String srcStr, int sPos, int ePos, String token, Predicate<Character> extraDelimiterTest)
       
      Nth
      Modifier and Type Method
      static int nth​(String srcStr, int n, char c)
      static int nth​(String srcStr, int n, String token)
      static int nth_CI​(String srcStr, int n, char c)
      static int nth_CI​(String srcStr, int n, String token)
       
      Nth, Range-Limited
      Modifier and Type Method
      static int nth​(String srcStr, int sPos, int ePos, int n, char c)
      static int nth​(String srcStr, int sPos, int ePos, int n, String token)
      static int nth_CI​(String srcStr, int sPos, int ePos, int n, char c)
      static int nth_CI​(String srcStr, int sPos, int ePos, int n, String token)
       
      Nth w/ Extra-Delimiter Test
      Modifier and Type Method
      static int nth​(String srcStr, int n, char c, Predicate<Character> extraDelimiterTest)
      static int nth​(String srcStr, int n, String token, Predicate<Character> extraDelimiterTest)
      static int nth_CI​(String srcStr, int n, char c, Predicate<Character> extraDelimiterTest)
      static int nth_CI​(String srcStr, int n, String token, Predicate<Character> extraDelimiterTest)
       
      Nth, Range-Limited w/ Extra-Delimiter Test
      Modifier and Type Method
      static int nth​(String srcStr, int sPos, int ePos, int n, char c, Predicate<Character> extraDelimiterTest)
      static int nth​(String srcStr, int sPos, int ePos, int n, String token, Predicate<Character> extraDelimiterTest)
      static int nth_CI​(String srcStr, int sPos, int ePos, int n, char c, Predicate<Character> extraDelimiterTest)
      static int nth_CI​(String srcStr, int sPos, int ePos, int n, String token, Predicate<Character> extraDelimiterTest)
       
      Nth-From-End
      Modifier and Type Method
      static int nthFromEnd​(String srcStr, int n, char c)
      static int nthFromEnd​(String srcStr, int n, String token)
      static int nthFromEnd_CI​(String srcStr, int n, char c)
      static int nthFromEnd_CI​(String srcStr, int n, String token)
       
      Nth-From-End, Range-Limited
      Modifier and Type Method
      static int nthFromEnd​(String srcStr, int sPos, int ePos, int n, char c)
      static int nthFromEnd​(String srcStr, int sPos, int ePos, int n, String token)
      static int nthFromEnd_CI​(String srcStr, int sPos, int ePos, int n, char c)
      static int nthFromEnd_CI​(String srcStr, int sPos, int ePos, int n, String token)
       
      Nth-From-End w/ Extra-Delimiter Test
      Modifier and Type Method
      static int nthFromEnd​(String srcStr, int n, char c, Predicate<Character> extraDelimiterTest)
      static int nthFromEnd​(String srcStr, int n, String token, Predicate<Character> extraDelimiterTest)
      static int nthFromEnd_CI​(String srcStr, int n, char c, Predicate<Character> extraDelimiterTest)
      static int nthFromEnd_CI​(String srcStr, int n, String token, Predicate<Character> extraDelimiterTest)
       
      Nth-From-End, Range-Limited w/ Extra-Delimiter Test
      Modifier and Type Method
      static int nthFromEnd​(String srcStr, int sPos, int ePos, int n, char c, Predicate<Character> extraDelimiterTest)
      static int nthFromEnd​(String srcStr, int sPos, int ePos, int n, String token, Predicate<Character> extraDelimiterTest)
      static int nthFromEnd_CI​(String srcStr, int sPos, int ePos, int n, char c, Predicate<Character> extraDelimiterTest)
      static int nthFromEnd_CI​(String srcStr, int sPos, int ePos, int n, String token, Predicate<Character> extraDelimiterTest)
       
      Left
      Modifier and Type Method
      static int left​(String srcStr, int fromIndex, char c)
      static int left​(String srcStr, int fromIndex, String token)
      static int left_CI​(String srcStr, int fromIndex, char c)
      static int left_CI​(String srcStr, int fromIndex, String token)
       
      Left w/ Extra-Delimiter Test
      Modifier and Type Method
      static int left​(String srcStr, int fromIndex, char c, Predicate<Character> extraDelimiterTest)
      static int left​(String srcStr, int fromIndex, String token, Predicate<Character> extraDelimiterTest)
      static int left_CI​(String srcStr, int fromIndex, char c, Predicate<Character> extraDelimiterTest)
      static int left_CI​(String srcStr, int fromIndex, String token, Predicate<Character> extraDelimiterTest)
       
      Nth-Left
      Modifier and Type Method
      static int nthLeft​(String srcStr, int fromIndex, int n, char c)
      static int nthLeft​(String srcStr, int fromIndex, int n, String token)
      static int nthLeft_CI​(String srcStr, int fromIndex, int n, char c)
      static int nthLeft_CI​(String srcStr, int fromIndex, int n, String token)
       
      Nth-Left w/ Extra-Delimiter Test
      Modifier and Type Method
      static int nthLeft​(String srcStr, int fromIndex, int n, char c, Predicate<Character> extraDelimiterTest)
      static int nthLeft​(String srcStr, int fromIndex, int n, String token, Predicate<Character> extraDelimiterTest)
      static int nthLeft_CI​(String srcStr, int fromIndex, int n, char c, Predicate<Character> extraDelimiterTest)
      static int nthLeft_CI​(String srcStr, int fromIndex, int n, String token, Predicate<Character> extraDelimiterTest)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • all_CI

        🡇     🗕  🗗  🗖
        public static int[] all_CI​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for all token-matches ofchar-parameter 'c' in 'srcStr', and return an integer-array of index-locations into 'srcStr' indicating where matches have occured.

        The comparisons performed ** are not ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an integer-array of String-index pointers will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        An integer-pointer array of all java.lang.String-indices where matches were found.

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV                  l = new LV(srcStr, sPos, ePos);
         IntStream.Builder   b = IntStream.builder();
        
         c = Character.toLowerCase(c);
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 b.accept(i);
        
         return b.build().toArray();
        
      • all_CI

        🡅  🡇     🗕  🗗  🗖
        public static int[] all_CI​(java.lang.String srcStr,
                                   int sPos,
                                   int ePos,
                                   char c)
        Search for all token-matches ofchar-parameter 'c' in 'srcStr', and return an integer-array of index-locations into 'srcStr' indicating where matches have occured.

        The comparisons performed ** are not ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an integer-array of String-index pointers will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        An integer-pointer array of all java.lang.String-indices where matches were found.

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV                  l = new LV(srcStr, sPos, ePos);
         IntStream.Builder   b = IntStream.builder();
        
         c = Character.toLowerCase(c);
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 b.accept(i);
        
         return b.build().toArray();
        
      • all_CI

        🡅  🡇     🗕  🗗  🗖
        public static int[] all_CI​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for all token-matches ofString-param 'token' in 'srcStr', and return an integer-array of index-locations into 'srcStr' indicating where matches have occured.

        The comparisons performed ** are not ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an integer-array of String-index pointers will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        An integer-pointer array of all java.lang.String-indices where matches were found.

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV                  l          = new LV(srcStr, sPos, ePos, token.length());
         IntStream.Builder   b          = IntStream.builder();
         int                 tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 b.accept(i);
        
         return b.build().toArray();
        
      • all_CI

        🡅  🡇     🗕  🗗  🗖
        public static int[] all_CI​(java.lang.String srcStr,
                                   int sPos,
                                   int ePos,
                                   java.lang.String token)
        Search for all token-matches ofString-param 'token' in 'srcStr', and return an integer-array of index-locations into 'srcStr' indicating where matches have occured.

        The comparisons performed ** are not ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an integer-array of String-index pointers will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        An integer-pointer array of all java.lang.String-indices where matches were found.

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV                  l          = new LV(srcStr, sPos, ePos, token.length());
         IntStream.Builder   b          = IntStream.builder();
         int                 tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 b.accept(i);
        
         return b.build().toArray();
        
      • all_CI

        🡅  🡇     🗕  🗗  🗖
        public static int[] all_CI​
                    (java.lang.String srcStr,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for all token-matches ofchar-parameter 'c' in 'srcStr', and return an integer-array of index-locations into 'srcStr' indicating where matches have occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an integer-array of String-index pointers will be returned.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        An integer-pointer array of all java.lang.String-indices where matches were found.

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Code:
        Exact Method Body:
         LV                  l = new LV(srcStr, 0, -1);
         IntStream.Builder   b = IntStream.builder();
        
         c = Character.toLowerCase(c);
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 b.accept(i);
        
         return b.build().toArray();
        
      • all_CI

        🡅  🡇     🗕  🗗  🗖
        public static int[] all_CI​(java.lang.String srcStr,
                                   char c)
        Search for all token-matches ofchar-parameter 'c' in 'srcStr', and return an integer-array of index-locations into 'srcStr' indicating where matches have occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an integer-array of String-index pointers will be returned.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        An integer-pointer array of all java.lang.String-indices where matches were found.

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Code:
        Exact Method Body:
         LV                  l = new LV(srcStr, 0, -1);
         IntStream.Builder   b = IntStream.builder();
        
         c = Character.toLowerCase(c);
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 b.accept(i);
        
         return b.build().toArray();
        
      • all_CI

        🡅  🡇     🗕  🗗  🗖
        public static int[] all_CI​
                    (java.lang.String srcStr,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for all token-matches ofString-param 'token' in 'srcStr', and return an integer-array of index-locations into 'srcStr' indicating where matches have occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an integer-array of String-index pointers will be returned.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        An integer-pointer array of all java.lang.String-indices where matches were found.

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Code:
        Exact Method Body:
         LV                  l          = new LV(srcStr, 0, -1, token.length());
         IntStream.Builder   b          = IntStream.builder();
         int                 tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 b.accept(i);
        
         return b.build().toArray();
        
      • all_CI

        🡅  🡇     🗕  🗗  🗖
        public static int[] all_CI​(java.lang.String srcStr,
                                   java.lang.String token)
        Search for all token-matches ofString-param 'token' in 'srcStr', and return an integer-array of index-locations into 'srcStr' indicating where matches have occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an integer-array of String-index pointers will be returned.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        An integer-pointer array of all java.lang.String-indices where matches were found.

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Code:
        Exact Method Body:
         LV                  l          = new LV(srcStr, 0, -1, token.length());
         IntStream.Builder   b          = IntStream.builder();
         int                 tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 b.accept(i);
        
         return b.build().toArray();
        
      • all

        🡅  🡇     🗕  🗗  🗖
        public static int[] all​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for all token-matches ofchar-parameter 'c' in 'srcStr', and return an integer-array of index-locations into 'srcStr' indicating where matches have occured.

        The comparisons performed ** are ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an integer-array of String-index pointers will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        An integer-pointer array of all java.lang.String-indices where matches were found.

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV                  l = new LV(srcStr, sPos, ePos);
         IntStream.Builder   b = IntStream.builder();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 b.accept(i);
        
         return b.build().toArray();
        
      • all

        🡅  🡇     🗕  🗗  🗖
        public static int[] all​(java.lang.String srcStr,
                                int sPos,
                                int ePos,
                                char c)
        Search for all token-matches ofchar-parameter 'c' in 'srcStr', and return an integer-array of index-locations into 'srcStr' indicating where matches have occured.

        The comparisons performed ** are ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an integer-array of String-index pointers will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        An integer-pointer array of all java.lang.String-indices where matches were found.

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV                  l = new LV(srcStr, sPos, ePos);
         IntStream.Builder   b = IntStream.builder();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 b.accept(i);
        
         return b.build().toArray();
        
      • all

        🡅  🡇     🗕  🗗  🗖
        public static int[] all​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for all token-matches ofString-param 'token' in 'srcStr', and return an integer-array of index-locations into 'srcStr' indicating where matches have occured.

        The comparisons performed ** are ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an integer-array of String-index pointers will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        An integer-pointer array of all java.lang.String-indices where matches were found.

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV                  l          = new LV(srcStr, sPos, ePos, token.length());
         IntStream.Builder   b          = IntStream.builder();
         int                 tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 b.accept(i);
        
         return b.build().toArray();
        
      • all

        🡅  🡇     🗕  🗗  🗖
        public static int[] all​(java.lang.String srcStr,
                                int sPos,
                                int ePos,
                                java.lang.String token)
        Search for all token-matches ofString-param 'token' in 'srcStr', and return an integer-array of index-locations into 'srcStr' indicating where matches have occured.

        The comparisons performed ** are ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an integer-array of String-index pointers will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        An integer-pointer array of all java.lang.String-indices where matches were found.

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV                  l          = new LV(srcStr, sPos, ePos, token.length());
         IntStream.Builder   b          = IntStream.builder();
         int                 tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 b.accept(i);
        
         return b.build().toArray();
        
      • all

        🡅  🡇     🗕  🗗  🗖
        public static int[] all​
                    (java.lang.String srcStr,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for all token-matches ofchar-parameter 'c' in 'srcStr', and return an integer-array of index-locations into 'srcStr' indicating where matches have occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an integer-array of String-index pointers will be returned.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        An integer-pointer array of all java.lang.String-indices where matches were found.

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Code:
        Exact Method Body:
         LV                  l = new LV(srcStr, 0, -1);
         IntStream.Builder   b = IntStream.builder();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 b.accept(i);
        
         return b.build().toArray();
        
      • all

        🡅  🡇     🗕  🗗  🗖
        public static int[] all​(java.lang.String srcStr,
                                char c)
        Search for all token-matches ofchar-parameter 'c' in 'srcStr', and return an integer-array of index-locations into 'srcStr' indicating where matches have occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an integer-array of String-index pointers will be returned.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        An integer-pointer array of all java.lang.String-indices where matches were found.

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Code:
        Exact Method Body:
         LV                  l = new LV(srcStr, 0, -1);
         IntStream.Builder   b = IntStream.builder();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 b.accept(i);
        
         return b.build().toArray();
        
      • all

        🡅  🡇     🗕  🗗  🗖
        public static int[] all​
                    (java.lang.String srcStr,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for all token-matches ofString-param 'token' in 'srcStr', and return an integer-array of index-locations into 'srcStr' indicating where matches have occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an integer-array of String-index pointers will be returned.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        An integer-pointer array of all java.lang.String-indices where matches were found.

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Code:
        Exact Method Body:
         LV                  l          = new LV(srcStr, 0, -1, token.length());
         IntStream.Builder   b          = IntStream.builder();
         int                 tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 b.accept(i);
        
         return b.build().toArray();
        
      • all

        🡅  🡇     🗕  🗗  🗖
        public static int[] all​(java.lang.String srcStr,
                                java.lang.String token)
        Search for all token-matches ofString-param 'token' in 'srcStr', and return an integer-array of index-locations into 'srcStr' indicating where matches have occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an integer-array of String-index pointers will be returned.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        An integer-pointer array of all java.lang.String-indices where matches were found.

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Code:
        Exact Method Body:
         LV                  l          = new LV(srcStr, 0, -1, token.length());
         IntStream.Builder   b          = IntStream.builder();
         int                 tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 b.accept(i);
        
         return b.build().toArray();
        
      • first_CI

        🡅  🡇     🗕  🗗  🗖
        public static int first_CI​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the first token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the first identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV l = new LV(srcStr, sPos, ePos);
        
         c = Character.toLowerCase(c);
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 return i;
        
         return -1;
        
      • first_CI

        🡅  🡇     🗕  🗗  🗖
        public static int first_CI​(java.lang.String srcStr,
                                   int sPos,
                                   int ePos,
                                   char c)
        Search for the first token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the first identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV l = new LV(srcStr, sPos, ePos);
        
         c = Character.toLowerCase(c);
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 return i;
        
         return -1;
        
      • first_CI

        🡅  🡇     🗕  🗗  🗖
        public static int first_CI​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the first token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the first identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV  l          = new LV(srcStr, sPos, ePos, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 return i;
        
         return -1;
        
      • first_CI

        🡅  🡇     🗕  🗗  🗖
        public static int first_CI​(java.lang.String srcStr,
                                   int sPos,
                                   int ePos,
                                   java.lang.String token)
        Search for the first token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the first identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV  l          = new LV(srcStr, sPos, ePos, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 return i;
        
         return -1;
        
      • first_CI

        🡅  🡇     🗕  🗗  🗖
        public static int first_CI​
                    (java.lang.String srcStr,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the first token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the first identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Code:
        Exact Method Body:
         LV l = new LV(srcStr, 0, -1);
        
         c = Character.toLowerCase(c);
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 return i;
        
         return -1;
        
      • first_CI

        🡅  🡇     🗕  🗗  🗖
        public static int first_CI​(java.lang.String srcStr,
                                   char c)
        Search for the first token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the first identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Code:
        Exact Method Body:
         LV l = new LV(srcStr, 0, -1);
        
         c = Character.toLowerCase(c);
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 return i;
        
         return -1;
        
      • first_CI

        🡅  🡇     🗕  🗗  🗖
        public static int first_CI​
                    (java.lang.String srcStr,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the first token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the first identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Code:
        Exact Method Body:
         LV  l          = new LV(srcStr, 0, -1, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 return i;
        
         return -1;
        
      • first_CI

        🡅  🡇     🗕  🗗  🗖
        public static int first_CI​(java.lang.String srcStr,
                                   java.lang.String token)
        Search for the first token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the first identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Code:
        Exact Method Body:
         LV  l          = new LV(srcStr, 0, -1, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 return i;
        
         return -1;
        
      • first

        🡅  🡇     🗕  🗗  🗖
        public static int first​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the first token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the first identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV l = new LV(srcStr, sPos, ePos);
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 return i;
        
         return -1;
        
      • first

        🡅  🡇     🗕  🗗  🗖
        public static int first​(java.lang.String srcStr,
                                int sPos,
                                int ePos,
                                char c)
        Search for the first token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the first identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV l = new LV(srcStr, sPos, ePos);
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 return i;
        
         return -1;
        
      • first

        🡅  🡇     🗕  🗗  🗖
        public static int first​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the first token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the first identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV  l          = new LV(srcStr, sPos, ePos, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 return i;
        
         return -1;
        
      • first

        🡅  🡇     🗕  🗗  🗖
        public static int first​(java.lang.String srcStr,
                                int sPos,
                                int ePos,
                                java.lang.String token)
        Search for the first token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the first identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV  l          = new LV(srcStr, sPos, ePos, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 return i;
        
         return -1;
        
      • first

        🡅  🡇     🗕  🗗  🗖
        public static int first​
                    (java.lang.String srcStr,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the first token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the first identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Code:
        Exact Method Body:
         LV l = new LV(srcStr, 0, -1);
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 return i;
        
         return -1;
        
      • first

        🡅  🡇     🗕  🗗  🗖
        public static int first​(java.lang.String srcStr,
                                char c)
        Search for the first token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the first identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Code:
        Exact Method Body:
         LV l = new LV(srcStr, 0, -1);
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 return i;
        
         return -1;
        
      • first

        🡅  🡇     🗕  🗗  🗖
        public static int first​
                    (java.lang.String srcStr,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the first token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the first identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Code:
        Exact Method Body:
         LV  l          = new LV(srcStr, 0, -1, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 return i;
        
         return -1;
        
      • first

        🡅  🡇     🗕  🗗  🗖
        public static int first​(java.lang.String srcStr,
                                java.lang.String token)
        Search for the first token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the first identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Code:
        Exact Method Body:
         LV  l          = new LV(srcStr, 0, -1, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 return i;
        
         return -1;
        
      • last_CI

        🡅  🡇     🗕  🗗  🗖
        public static int last_CI​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the last token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the last identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV l = new LV(srcStr, sPos, ePos);
        
         c = Character.toLowerCase(c);
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 return i;
        
         return -1;
        
      • last_CI

        🡅  🡇     🗕  🗗  🗖
        public static int last_CI​(java.lang.String srcStr,
                                  int sPos,
                                  int ePos,
                                  char c)
        Search for the last token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the last identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV l = new LV(srcStr, sPos, ePos);
        
         c = Character.toLowerCase(c);
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 return i;
        
         return -1;
        
      • last_CI

        🡅  🡇     🗕  🗗  🗖
        public static int last_CI​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the last token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the last identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV  l          = new LV(srcStr, sPos, ePos, token.length());
         int tokenLen   = token.length();
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 return i;
        
         return -1;
        
      • last_CI

        🡅  🡇     🗕  🗗  🗖
        public static int last_CI​(java.lang.String srcStr,
                                  int sPos,
                                  int ePos,
                                  java.lang.String token)
        Search for the last token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the last identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV  l          = new LV(srcStr, sPos, ePos, token.length());
         int tokenLen   = token.length();
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 return i;
        
         return -1;
        
      • last_CI

        🡅  🡇     🗕  🗗  🗖
        public static int last_CI​
                    (java.lang.String srcStr,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the last token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the last identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Code:
        Exact Method Body:
         LV l = new LV(srcStr, 0, -1);
        
         c = Character.toLowerCase(c);
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 return i;
        
         return -1;
        
      • last_CI

        🡅  🡇     🗕  🗗  🗖
        public static int last_CI​(java.lang.String srcStr,
                                  char c)
        Search for the last token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the last identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Code:
        Exact Method Body:
         LV l = new LV(srcStr, 0, -1);
        
         c = Character.toLowerCase(c);
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 return i;
        
         return -1;
        
      • last_CI

        🡅  🡇     🗕  🗗  🗖
        public static int last_CI​
                    (java.lang.String srcStr,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the last token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the last identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Code:
        Exact Method Body:
         LV  l          = new LV(srcStr, 0, -1, token.length());
         int tokenLen   = token.length();
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 return i;
        
         return -1;
        
      • last_CI

        🡅  🡇     🗕  🗗  🗖
        public static int last_CI​(java.lang.String srcStr,
                                  java.lang.String token)
        Search for the last token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the last identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Code:
        Exact Method Body:
         LV  l          = new LV(srcStr, 0, -1, token.length());
         int tokenLen   = token.length();
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 return i;
        
         return -1;
        
      • last

        🡅  🡇     🗕  🗗  🗖
        public static int last​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the last token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the last identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV l = new LV(srcStr, sPos, ePos);
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 return i;
        
         return -1;
        
      • last

        🡅  🡇     🗕  🗗  🗖
        public static int last​(java.lang.String srcStr,
                               int sPos,
                               int ePos,
                               char c)
        Search for the last token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the last identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV l = new LV(srcStr, sPos, ePos);
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 return i;
        
         return -1;
        
      • last

        🡅  🡇     🗕  🗗  🗖
        public static int last​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the last token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the last identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV  l          = new LV(srcStr, sPos, ePos, token.length());
         int tokenLen   = token.length();
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 return i;
        
         return -1;
        
      • last

        🡅  🡇     🗕  🗗  🗖
        public static int last​(java.lang.String srcStr,
                               int sPos,
                               int ePos,
                               java.lang.String token)
        Search for the last token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the last identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        Code:
        Exact Method Body:
         LV  l          = new LV(srcStr, sPos, ePos, token.length());
         int tokenLen   = token.length();
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 return i;
        
         return -1;
        
      • last

        🡅  🡇     🗕  🗗  🗖
        public static int last​
                    (java.lang.String srcStr,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the last token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the last identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Code:
        Exact Method Body:
         LV l = new LV(srcStr, 0, -1);
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 return i;
        
         return -1;
        
      • last

        🡅  🡇     🗕  🗗  🗖
        public static int last​(java.lang.String srcStr,
                               char c)
        Search for the last token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the last identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Code:
        Exact Method Body:
         LV l = new LV(srcStr, 0, -1);
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 return i;
        
         return -1;
        
      • last

        🡅  🡇     🗕  🗗  🗖
        public static int last​
                    (java.lang.String srcStr,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the last token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the last identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Code:
        Exact Method Body:
         LV  l          = new LV(srcStr, 0, -1, token.length());
         int tokenLen   = token.length();
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 return i;
        
         return -1;
        
      • last

        🡅  🡇     🗕  🗗  🗖
        public static int last​(java.lang.String srcStr,
                               java.lang.String token)
        Search for the last token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the last identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Code:
        Exact Method Body:
         LV  l          = new LV(srcStr, 0, -1, token.length());
         int tokenLen   = token.length();
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 return i;
        
         return -1;
        
      • nth_CI

        🡅  🡇     🗕  🗗  🗖
        public static int nth_CI​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     int n,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the nth token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        n - This is the number of matches to skip when searching for char-parameter 'c' before returning an answer.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV l = new LV(srcStr, sPos, ePos);
        
         c = Character.toLowerCase(c);
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nth_CI

        🡅  🡇     🗕  🗗  🗖
        public static int nth_CI​(java.lang.String srcStr,
                                 int sPos,
                                 int ePos,
                                 int n,
                                 char c)
        Search for the nth token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        n - This is the number of matches to skip when searching for char-parameter 'c' before returning an answer.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV l = new LV(srcStr, sPos, ePos);
        
         c = Character.toLowerCase(c);
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nth_CI

        🡅  🡇     🗕  🗗  🗖
        public static int nth_CI​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     int n,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the nth token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        n - This is the number of matches to skip when searching for String-param 'token' before returning an answer.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV  l          = new LV(srcStr, sPos, ePos, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nth_CI

        🡅  🡇     🗕  🗗  🗖
        public static int nth_CI​(java.lang.String srcStr,
                                 int sPos,
                                 int ePos,
                                 int n,
                                 java.lang.String token)
        Search for the nth token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        n - This is the number of matches to skip when searching for String-param 'token' before returning an answer.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV  l          = new LV(srcStr, sPos, ePos, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nth_CI

        🡅  🡇     🗕  🗗  🗖
        public static int nth_CI​
                    (java.lang.String srcStr,
                     int n,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the nth token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        n - This is the number of matches to skip when searching for char-parameter 'c' before returning an answer.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV l = new LV(srcStr, 0, -1);
        
         c = Character.toLowerCase(c);
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nth_CI

        🡅  🡇     🗕  🗗  🗖
        public static int nth_CI​(java.lang.String srcStr,
                                 int n,
                                 char c)
        Search for the nth token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        n - This is the number of matches to skip when searching for char-parameter 'c' before returning an answer.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV l = new LV(srcStr, 0, -1);
        
         c = Character.toLowerCase(c);
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nth_CI

        🡅  🡇     🗕  🗗  🗖
        public static int nth_CI​
                    (java.lang.String srcStr,
                     int n,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the nth token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        n - This is the number of matches to skip when searching for String-param 'token' before returning an answer.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV  l          = new LV(srcStr, 0, -1, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nth_CI

        🡅  🡇     🗕  🗗  🗖
        public static int nth_CI​(java.lang.String srcStr,
                                 int n,
                                 java.lang.String token)
        Search for the nth token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        n - This is the number of matches to skip when searching for String-param 'token' before returning an answer.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV  l          = new LV(srcStr, 0, -1, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nth

        🡅  🡇     🗕  🗗  🗖
        public static int nth​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     int n,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the nth token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        n - This is the number of matches to skip when searching for char-parameter 'c' before returning an answer.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV l = new LV(srcStr, sPos, ePos);
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nth

        🡅  🡇     🗕  🗗  🗖
        public static int nth​(java.lang.String srcStr,
                              int sPos,
                              int ePos,
                              int n,
                              char c)
        Search for the nth token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        n - This is the number of matches to skip when searching for char-parameter 'c' before returning an answer.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV l = new LV(srcStr, sPos, ePos);
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nth

        🡅  🡇     🗕  🗗  🗖
        public static int nth​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     int n,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the nth token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        n - This is the number of matches to skip when searching for String-param 'token' before returning an answer.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV  l          = new LV(srcStr, sPos, ePos, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nth

        🡅  🡇     🗕  🗗  🗖
        public static int nth​(java.lang.String srcStr,
                              int sPos,
                              int ePos,
                              int n,
                              java.lang.String token)
        Search for the nth token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        n - This is the number of matches to skip when searching for String-param 'token' before returning an answer.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV  l          = new LV(srcStr, sPos, ePos, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nth

        🡅  🡇     🗕  🗗  🗖
        public static int nth​
                    (java.lang.String srcStr,
                     int n,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the nth token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        n - This is the number of matches to skip when searching for char-parameter 'c' before returning an answer.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV l = new LV(srcStr, 0, -1);
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nth

        🡅  🡇     🗕  🗗  🗖
        public static int nth​(java.lang.String srcStr,
                              int n,
                              char c)
        Search for the nth token-match of char-parameter 'c' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        n - This is the number of matches to skip when searching for char-parameter 'c' before returning an answer.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV l = new LV(srcStr, 0, -1);
        
         for (int i=l.start; i < l.end; i++)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nth

        🡅  🡇     🗕  🗗  🗖
        public static int nth​
                    (java.lang.String srcStr,
                     int n,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the nth token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        n - This is the number of matches to skip when searching for String-param 'token' before returning an answer.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV  l          = new LV(srcStr, 0, -1, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nth

        🡅  🡇     🗕  🗗  🗖
        public static int nth​(java.lang.String srcStr,
                              int n,
                              java.lang.String token)
        Search for the nth token-match of String-param 'token' in 'srcStr', and return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        n - This is the number of matches to skip when searching for String-param 'token' before returning an answer.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV  l          = new LV(srcStr, 0, -1, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.start; i < l.end; i++)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthFromEnd_CI

        🡅  🡇     🗕  🗗  🗖
        public static int nthFromEnd_CI​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     int n,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the nth token-match of char-parameter 'c' but start the search with the last character of the String, and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        n - This is the number of matches to skip when searching for char-parameter 'c' before returning an answer.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr', counting left from the end of 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV l = new LV(srcStr, sPos, ePos);
        
         c = Character.toLowerCase(c);
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthFromEnd_CI

        🡅  🡇     🗕  🗗  🗖
        public static int nthFromEnd_CI​(java.lang.String srcStr,
                                        int sPos,
                                        int ePos,
                                        int n,
                                        char c)
        Search for the nth token-match of char-parameter 'c' but start the search with the last character of the String, and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        n - This is the number of matches to skip when searching for char-parameter 'c' before returning an answer.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr', counting left from the end of 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV l = new LV(srcStr, sPos, ePos);
        
         c = Character.toLowerCase(c);
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthFromEnd_CI

        🡅  🡇     🗕  🗗  🗖
        public static int nthFromEnd_CI​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     int n,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the nth token-match of String-param 'token' but start the search with the last character of the String, and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        n - This is the number of matches to skip when searching for String-param 'token' before returning an answer.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr', counting left from the end of 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV  l          = new LV(srcStr, sPos, ePos, token.length());
         int tokenLen   = token.length();
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthFromEnd_CI

        🡅  🡇     🗕  🗗  🗖
        public static int nthFromEnd_CI​(java.lang.String srcStr,
                                        int sPos,
                                        int ePos,
                                        int n,
                                        java.lang.String token)
        Search for the nth token-match of String-param 'token' but start the search with the last character of the String, and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        n - This is the number of matches to skip when searching for String-param 'token' before returning an answer.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr', counting left from the end of 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV  l          = new LV(srcStr, sPos, ePos, token.length());
         int tokenLen   = token.length();
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthFromEnd_CI

        🡅  🡇     🗕  🗗  🗖
        public static int nthFromEnd_CI​
                    (java.lang.String srcStr,
                     int n,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the nth token-match of char-parameter 'c' but start the search with the last character of the String, and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        n - This is the number of matches to skip when searching for char-parameter 'c' before returning an answer.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr', counting left from the end of 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV l = new LV(srcStr, 0, -1);
        
         c = Character.toLowerCase(c);
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthFromEnd_CI

        🡅  🡇     🗕  🗗  🗖
        public static int nthFromEnd_CI​(java.lang.String srcStr,
                                        int n,
                                        char c)
        Search for the nth token-match of char-parameter 'c' but start the search with the last character of the String, and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        n - This is the number of matches to skip when searching for char-parameter 'c' before returning an answer.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr', counting left from the end of 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV l = new LV(srcStr, 0, -1);
        
         c = Character.toLowerCase(c);
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthFromEnd_CI

        🡅  🡇     🗕  🗗  🗖
        public static int nthFromEnd_CI​
                    (java.lang.String srcStr,
                     int n,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the nth token-match of String-param 'token' but start the search with the last character of the String, and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        n - This is the number of matches to skip when searching for String-param 'token' before returning an answer.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr', counting left from the end of 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV  l          = new LV(srcStr, 0, -1, token.length());
         int tokenLen   = token.length();
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthFromEnd_CI

        🡅  🡇     🗕  🗗  🗖
        public static int nthFromEnd_CI​(java.lang.String srcStr,
                                        int n,
                                        java.lang.String token)
        Search for the nth token-match of String-param 'token' but start the search with the last character of the String, and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        n - This is the number of matches to skip when searching for String-param 'token' before returning an answer.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr', counting left from the end of 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV  l          = new LV(srcStr, 0, -1, token.length());
         int tokenLen   = token.length();
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthFromEnd

        🡅  🡇     🗕  🗗  🗖
        public static int nthFromEnd​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     int n,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the nth token-match of char-parameter 'c' but start the search with the last character of the String, and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        n - This is the number of matches to skip when searching for char-parameter 'c' before returning an answer.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr', counting left from the end of 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV l = new LV(srcStr, sPos, ePos);
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthFromEnd

        🡅  🡇     🗕  🗗  🗖
        public static int nthFromEnd​(java.lang.String srcStr,
                                     int sPos,
                                     int ePos,
                                     int n,
                                     char c)
        Search for the nth token-match of char-parameter 'c' but start the search with the last character of the String, and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        n - This is the number of matches to skip when searching for char-parameter 'c' before returning an answer.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr', counting left from the end of 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV l = new LV(srcStr, sPos, ePos);
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthFromEnd

        🡅  🡇     🗕  🗗  🗖
        public static int nthFromEnd​
                    (java.lang.String srcStr,
                     int sPos,
                     int ePos,
                     int n,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the nth token-match of String-param 'token' but start the search with the last character of the String, and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        n - This is the number of matches to skip when searching for String-param 'token' before returning an answer.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr', counting left from the end of 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV  l          = new LV(srcStr, sPos, ePos, token.length());
         int tokenLen   = token.length();
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthFromEnd

        🡅  🡇     🗕  🗗  🗖
        public static int nthFromEnd​(java.lang.String srcStr,
                                     int sPos,
                                     int ePos,
                                     int n,
                                     java.lang.String token)
        Search for the nth token-match of String-param 'token' but start the search with the last character of the String, and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive

        This method allows sub-sections, or 'partial-sections', of the java.lang.String to be checked. This is done via the int 'sPos' and the int 'ePos' parameters. These are indices into the 'srcStr' input-parameter.
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        sPos - This is the integer-index String-location which limits the left-most position to search in 'srcStr'. This value is 'inclusive,' meaning that if the character at this index (in 'srcStr') is part of a match, it shall be factored into the return results. Note that if this value is negative, or larger than the length of 'srcStr', an exception will be thrown.
        ePos - This is the integer-index String-location which limits the right-most position to search in 'srcStr'. This value is 'exclusive,' meaning that if the character at this location is part of match, it will not be calculated into the results.

        If this value is larger than the length of input-parameter 'srcStr', an exception will throw.

        NOTE: Passing a negative value to this parameter, 'ePos', will cause its to be reset to the integer-value: srcStr.length()
        n - This is the number of matches to skip when searching for String-param 'token' before returning an answer.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr', counting left from the end of 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        java.lang.StringIndexOutOfBoundsException - This exception shall be thrown if any of the following are true:

        • If 'sPos' is negative, or if sPos is greater-than-or-equal-to the length of the String
        • If 'ePos' is zero, or greater than the length of the String
        • If the value of 'sPos' is a larger integer than 'ePos'. If ePos was negative, it is first reset to String.length(), before this check is done.
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV  l          = new LV(srcStr, sPos, ePos, token.length());
         int tokenLen   = token.length();
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthFromEnd

        🡅  🡇     🗕  🗗  🗖
        public static int nthFromEnd​
                    (java.lang.String srcStr,
                     int n,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the nth token-match of char-parameter 'c' but start the search with the last character of the String, and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        n - This is the number of matches to skip when searching for char-parameter 'c' before returning an answer.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr', counting left from the end of 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV l = new LV(srcStr, 0, -1);
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthFromEnd

        🡅  🡇     🗕  🗗  🗖
        public static int nthFromEnd​(java.lang.String srcStr,
                                     int n,
                                     char c)
        Search for the nth token-match of char-parameter 'c' but start the search with the last character of the String, and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        n - This is the number of matches to skip when searching for char-parameter 'c' before returning an answer.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr', counting left from the end of 'srcStr'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV l = new LV(srcStr, 0, -1);
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthFromEnd

        🡅  🡇     🗕  🗗  🗖
        public static int nthFromEnd​
                    (java.lang.String srcStr,
                     int n,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the nth token-match of String-param 'token' but start the search with the last character of the String, and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        n - This is the number of matches to skip when searching for String-param 'token' before returning an answer.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr', counting left from the end of 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV  l          = new LV(srcStr, 0, -1, token.length());
         int tokenLen   = token.length();
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthFromEnd

        🡅  🡇     🗕  🗗  🗖
        public static int nthFromEnd​(java.lang.String srcStr,
                                     int n,
                                     java.lang.String token)
        Search for the nth token-match of String-param 'token' but start the search with the last character of the String, and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        n - This is the number of matches to skip when searching for String-param 'token' before returning an answer.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr', counting left from the end of 'srcStr'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV  l          = new LV(srcStr, 0, -1, token.length());
         int tokenLen   = token.length();
        
         for (int i=(l.end-1); i >= l.start; i--)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • left_CI

        🡅  🡇     🗕  🗗  🗖
        public static int left_CI​
                    (java.lang.String srcStr,
                     int fromIndex,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the first token-match of char-parameter 'c' searching left beginning at 'srcStr' position 'fromIndex'. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        fromIndex - This is the right-most index-position in 'srcStr' (*INCLUSIVE*) from where the search shall start.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr', performing the search in the left direction, beginning at String-index 'fromIndex'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Code:
        Exact Method Body:
         LV l = new LV(srcStr, 0, fromIndex);
        
         c = Character.toLowerCase(c);
        
         for (int i=l.end; i >= 0; i--)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 return i;
        
         return -1;
        
      • left_CI

        🡅  🡇     🗕  🗗  🗖
        public static int left_CI​(java.lang.String srcStr,
                                  int fromIndex,
                                  char c)
        Search for the first token-match of char-parameter 'c' searching left beginning at 'srcStr' position 'fromIndex'. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        fromIndex - This is the right-most index-position in 'srcStr' (*INCLUSIVE*) from where the search shall start.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr', performing the search in the left direction, beginning at String-index 'fromIndex'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Code:
        Exact Method Body:
         LV l = new LV(srcStr, 0, fromIndex);
        
         c = Character.toLowerCase(c);
        
         for (int i=l.end; i >= 0; i--)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 return i;
        
         return -1;
        
      • left_CI

        🡅  🡇     🗕  🗗  🗖
        public static int left_CI​
                    (java.lang.String srcStr,
                     int fromIndex,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the first token-match of String-param 'token' searching left beginning at 'srcStr' position 'fromIndex'. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        fromIndex - This is the right-most index-position in 'srcStr' (*INCLUSIVE*) from where the search shall start.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr', performing the search in the left direction, beginning at String-index 'fromIndex'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Code:
        Exact Method Body:
         LV  l          = new LV(srcStr, 0, fromIndex, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.end; i >= 0; i--)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 return i;
        
         return -1;
        
      • left_CI

        🡅  🡇     🗕  🗗  🗖
        public static int left_CI​(java.lang.String srcStr,
                                  int fromIndex,
                                  java.lang.String token)
        Search for the first token-match of String-param 'token' searching left beginning at 'srcStr' position 'fromIndex'. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        fromIndex - This is the right-most index-position in 'srcStr' (*INCLUSIVE*) from where the search shall start.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr', performing the search in the left direction, beginning at String-index 'fromIndex'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Code:
        Exact Method Body:
         LV  l          = new LV(srcStr, 0, fromIndex, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.end; i >= 0; i--)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 return i;
        
         return -1;
        
      • left

        🡅  🡇     🗕  🗗  🗖
        public static int left​
                    (java.lang.String srcStr,
                     int fromIndex,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the first token-match of char-parameter 'c' searching left beginning at 'srcStr' position 'fromIndex'. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        fromIndex - This is the right-most index-position in 'srcStr' (*INCLUSIVE*) from where the search shall start.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr', performing the search in the left direction, beginning at String-index 'fromIndex'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Code:
        Exact Method Body:
         LV l = new LV(srcStr, 0, fromIndex);
        
         for (int i=l.end; i >= 0; i--)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 return i;
        
         return -1;
        
      • left

        🡅  🡇     🗕  🗗  🗖
        public static int left​(java.lang.String srcStr,
                               int fromIndex,
                               char c)
        Search for the first token-match of char-parameter 'c' searching left beginning at 'srcStr' position 'fromIndex'. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        fromIndex - This is the right-most index-position in 'srcStr' (*INCLUSIVE*) from where the search shall start.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr', performing the search in the left direction, beginning at String-index 'fromIndex'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Code:
        Exact Method Body:
         LV l = new LV(srcStr, 0, fromIndex);
        
         for (int i=l.end; i >= 0; i--)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 return i;
        
         return -1;
        
      • left

        🡅  🡇     🗕  🗗  🗖
        public static int left​
                    (java.lang.String srcStr,
                     int fromIndex,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the first token-match of String-param 'token' searching left beginning at 'srcStr' position 'fromIndex'. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        fromIndex - This is the right-most index-position in 'srcStr' (*INCLUSIVE*) from where the search shall start.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr', performing the search in the left direction, beginning at String-index 'fromIndex'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Code:
        Exact Method Body:
         LV  l          = new LV(srcStr, 0, fromIndex, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.end; i >= 0; i--)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 return i;
        
         return -1;
        
      • left

        🡅  🡇     🗕  🗗  🗖
        public static int left​(java.lang.String srcStr,
                               int fromIndex,
                               java.lang.String token)
        Search for the first token-match of String-param 'token' searching left beginning at 'srcStr' position 'fromIndex'. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        fromIndex - This is the right-most index-position in 'srcStr' (*INCLUSIVE*) from where the search shall start.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr', performing the search in the left direction, beginning at String-index 'fromIndex'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Code:
        Exact Method Body:
         LV  l          = new LV(srcStr, 0, fromIndex, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.end; i >= 0; i--)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 return i;
        
         return -1;
        
      • nthLeft_CI

        🡅  🡇     🗕  🗗  🗖
        public static int nthLeft_CI​
                    (java.lang.String srcStr,
                     int fromIndex,
                     int n,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the nth token-match of char-parameter 'c' in 'srcStr', but begin the search at index-position 'fromIndex' and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        fromIndex - This is the right-most index-position in 'srcStr' (*INCLUSIVE*) from where the search shall start.
        n - This is the number of matches to skip when searching for char-parameter 'c' before returning an answer.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr', performing the search in the left direction, beginning at String-index 'fromIndex'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV l = new LV(srcStr, 0, fromIndex);
        
         c = Character.toLowerCase(c);
        
         for (int i=l.end; i >= 0; i--)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthLeft_CI

        🡅  🡇     🗕  🗗  🗖
        public static int nthLeft_CI​(java.lang.String srcStr,
                                     int fromIndex,
                                     int n,
                                     char c)
        Search for the nth token-match of char-parameter 'c' in 'srcStr', but begin the search at index-position 'fromIndex' and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        fromIndex - This is the right-most index-position in 'srcStr' (*INCLUSIVE*) from where the search shall start.
        n - This is the number of matches to skip when searching for char-parameter 'c' before returning an answer.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr', performing the search in the left direction, beginning at String-index 'fromIndex'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV l = new LV(srcStr, 0, fromIndex);
        
         c = Character.toLowerCase(c);
        
         for (int i=l.end; i >= 0; i--)
        
             if (    (c == Character.toLowerCase(srcStr.charAt(i)))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthLeft_CI

        🡅  🡇     🗕  🗗  🗖
        public static int nthLeft_CI​
                    (java.lang.String srcStr,
                     int fromIndex,
                     int n,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the nth token-match of String-param 'token' in 'srcStr', but begin the search at index-position 'fromIndex' and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        fromIndex - This is the right-most index-position in 'srcStr' (*INCLUSIVE*) from where the search shall start.
        n - This is the number of matches to skip when searching for String-param 'token' before returning an answer.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr', performing the search in the left direction, beginning at String-index 'fromIndex'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV  l          = new LV(srcStr, 0, fromIndex, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.end; i >= 0; i--)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthLeft_CI

        🡅  🡇     🗕  🗗  🗖
        public static int nthLeft_CI​(java.lang.String srcStr,
                                     int fromIndex,
                                     int n,
                                     java.lang.String token)
        Search for the nth token-match of String-param 'token' in 'srcStr', but begin the search at index-position 'fromIndex' and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are not ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        fromIndex - This is the right-most index-position in 'srcStr' (*INCLUSIVE*) from where the search shall start.
        n - This is the number of matches to skip when searching for String-param 'token' before returning an answer.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr', performing the search in the left direction, beginning at String-index 'fromIndex'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV  l          = new LV(srcStr, 0, fromIndex, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.end; i >= 0; i--)
        
             if (    srcStr.regionMatches(true, i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthLeft

        🡅  🡇     🗕  🗗  🗖
        public static int nthLeft​
                    (java.lang.String srcStr,
                     int fromIndex,
                     int n,
                     char c,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the nth token-match of char-parameter 'c' in 'srcStr', but begin the search at index-position 'fromIndex' and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        fromIndex - This is the right-most index-position in 'srcStr' (*INCLUSIVE*) from where the search shall start.
        n - This is the number of matches to skip when searching for char-parameter 'c' before returning an answer.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input char 'c' parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr', performing the search in the left direction, beginning at String-index 'fromIndex'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV l = new LV(srcStr, 0, fromIndex);
        
         for (int i=l.end; i >= 0; i--)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i+1)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthLeft

        🡅  🡇     🗕  🗗  🗖
        public static int nthLeft​(java.lang.String srcStr,
                                  int fromIndex,
                                  int n,
                                  char c)
        Search for the nth token-match of char-parameter 'c' in 'srcStr', but begin the search at index-position 'fromIndex' and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        fromIndex - This is the right-most index-position in 'srcStr' (*INCLUSIVE*) from where the search shall start.
        n - This is the number of matches to skip when searching for char-parameter 'c' before returning an answer.
        c - This is the character that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-Character match in 'srcStr', performing the search in the left direction, beginning at String-index 'fromIndex'

        NOTE: The concept of a char-TOKEN match will be defined as nearly identical to a regular 'contains-character' match, with the added requirement that BOTH the character directly preceding the matching-char AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV l = new LV(srcStr, 0, fromIndex);
        
         for (int i=l.end; i >= 0; i--)
        
             if (    (c == srcStr.charAt(i))
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i+1) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i+1)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthLeft

        🡅  🡇     🗕  🗗  🗖
        public static int nthLeft​
                    (java.lang.String srcStr,
                     int fromIndex,
                     int n,
                     java.lang.String token,
                     java.util.function.Predicate<java.lang.Character> extraDelimiterTest)
        
        Search for the nth token-match of String-param 'token' in 'srcStr', but begin the search at index-position 'fromIndex' and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        fromIndex - This is the right-most index-position in 'srcStr' (*INCLUSIVE*) from where the search shall start.
        n - This is the number of matches to skip when searching for String-param 'token' before returning an answer.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        extraDelimiterTest - When this method makes token comparisons using the input String-token parameter, if the logic finds a match anywhere within String parameter 'srcStr', it will check both the character immediately preceding and the character directly after that match before considering the match as a token-match. This Predicate<Character> test allows the programmer to identify characters in addition to white-space that identify the match as a token match.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr', performing the search in the left direction, beginning at String-index 'fromIndex'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Any character that matches the user-provided Predicate<Character> 'extraDelimiterTest'
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV  l          = new LV(srcStr, 0, fromIndex, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.end; i >= 0; i--)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1))
                     ||   extraDelimiterTest.test(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen))
                     ||   extraDelimiterTest.test(srcStr.charAt(i + tokenLen)))
             )
                 if (--n == 0) return i;
        
         return -1;
        
      • nthLeft

        🡅     🗕  🗗  🗖
        public static int nthLeft​(java.lang.String srcStr,
                                  int fromIndex,
                                  int n,
                                  java.lang.String token)
        Search for the nth token-match of String-param 'token' in 'srcStr', but begin the search at index-position 'fromIndex' and work left. Return the integer index-location into 'srcStr' where the match occured.

        The comparisons performed ** are ** case-sensitive
        Parameters:
        srcStr - This may be any java.lang.String. Its contents will be searched for the specified token-matches, and an an index-pointer (an integer) will be returned.
        fromIndex - This is the right-most index-position in 'srcStr' (*INCLUSIVE*) from where the search shall start.
        n - This is the number of matches to skip when searching for String-param 'token' before returning an answer.
        token - This is the sub-string that will be 'searched-for' in input-parameter String 'srcStr'.
        Returns:
        The 'srcStr' String-index of the nth identified TOKEN-String match in 'srcStr', performing the search in the left direction, beginning at String-index 'fromIndex'

        NOTE: The concept of a TOKEN match will be defined as nearly identical to a sub-string match, with the added requirement that BOTH the character directly preceding the sub-string match AND the character immediately following it may only equal one of these values:

        white-space (matching '\s')
        String-start (matching '^')
        String-terminus (matching '$')
        Throws:
        NException - If the value of 'n' is negative, or greater than srcStr.length(), this exception shall throw.
        Code:
        Exact Method Body:
         NException.check(n, srcStr);
        
         LV  l          = new LV(srcStr, 0, fromIndex, token.length());
         int tokenLen   = token.length();
        
         for (int i=l.end; i >= 0; i--)
        
             if (    srcStr.regionMatches(i, token, 0, tokenLen)
                 &&  (    (i==0)
                     ||   Character.isWhitespace(srcStr.charAt(i-1)))
                 &&  (    ((i + tokenLen) == srcStr.length())
                     ||   Character.isWhitespace(srcStr.charAt(i + tokenLen)))
             )
                 if (--n == 0) return i;
        
         return -1;