Package Torello.Java
Class StrTokCmpr
- java.lang.Object
-
- Torello.Java.StrTokCmpr
-
public class StrTokCmpr extends java.lang.Object
Similar to class String-Compare, String-Token-Compare also provides an exhaustive suite of methods that extend the basic JavaStringmethodsequals, contains, startsWithandendsWith, but further allowing a user to specify the match-string boundary-characters.
This class is identical toclass StrCmpr- save one primary difference. The substrings that are tested must be surrounded by white-space, or by a specified character-delimiter test, before the comparison logic considers them to have matched.
StrTokCmpr =>
StrTok:Token-Matchesare 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 suppliedCharacter-Predicate test().
Cmpr:Each of the methods in this class shall return anbooleanthat indicates whether the input'srcStr'matches the method's query-specifications. The various queries in this class are based on the presence or absence of a particularString(parameter'token(s)') being inside anotherSource-String(parameter'srcString').
Methods Available
Method-Name Key-Word Explanation NAND May not find any matches between the primary String srcStrparameter, and theString'sinString... tokens
NAND-NOTE: There is one very important subtlety about the meaning of'NAND'here. In this case, the methods that use'NAND'interpret its meaning as "NOT ANY ONE OF..." - meaning all comparisons must fail.XOR Must find precisely one match between the primary String srcStrparameter, and theString'sinString... tokens.
There is one 'philosophical note' which is that if multiple copies of an identical-Stringare passed via the comparison-Stringarray (String... tokens), all XOR methods shall not pay heed to the notion that they the'srcStr'parameter may have only started-with, ended-with or contained a singleString(and 'philosophically passing' the XOR, one-and-only-one test). The internal-logical is 'programmatically ignorant' of this - multiple copies of an identical-String(or identical, ignoring-case) could theoretically be flagged via throwing anIllegalArgumentException. However, no such check is performed.OR Must find at least one match between the primary String srcStrparameter, and theString'sin the'tokens'parameter.AND Must identify a containing-match between each and every StringinString... tokensand the primary'srcStr'parameter.Starts With The provided token-Stringmust match each character at the beginning of theString-parameter'srcStr'. Furthermore, the character immediately after thetoken-Stringin'srcStr'must be either:
- White-space (matching
'\s') String-terminus (matching'$')- In situations where an
extraDelimiterTesthas been passed to the method, characters that receive TRUE from the invokation of theCharacter-Predicate's test(char)method shall also be considered for a'Token-Match'.
Ends With The provided token-Stringmust match each character at the ending of theString-parameter'srcStr'. Furthermore, the character directly before thetoken-Stringin'srcStr'must be either:- White-space (matching
'\s') String-start (matching'^')- In situations where an
extraDelimiterTesthas been passed to the method, characters that receive TRUE from the invokation of theCharacter-Predicate's test(char)method shall also be considered for a'Token-Match'.
Contains The provided token-Stringmust be a substring of theString-parameter'srcStr'. Furthermore, the characters directly before and immediately following thetoken-Stringmatch location in'srcStr'must assume one of the following values:
- White-space (matching
'\s') String-start (matching'^')String-terminus (matching'$')- In situations where an
extraDelimiterTesthas been passed to the method, characters that receive TRUE from the invokation of theCharacter-Predicate's test(char)method shall also be considered for a'Token-Match'.
CI (Case Insensitive) All equality-tests will be done on a Case Insensitivebasis.Method Parameters
Parameter Explanation String srcStrThis parameter is mandatory for every method here. It is the source Stringthat is being searched. Every method is designed to iterate through the characters in thisString, searching for matches oftoken(s).int nthThis represents the 'nth'match of a comparisonfor-loop. When the method-signature used includes the parameter'nth', the firstn-1matches that are found - will be skipped, and the'nth'match is, instead, returned.
EXCEPTIONS: AnNExceptionshall throw if the value of parameter'nth'is zero, negative, or larger than the size of the input html-Vector.int sPos, int ePosWhen these parameters are present, only substring'sthat are found between these specifiedStringindices will be considered when returning results fromStrTokIndexOf.
NOTE: In every situation where the parametersint sPos, int ePosare used, parameter'ePos'will accept a negative value, but parameter'sPos'will not. When'ePos'is passed a negative-value, the internalLV('Loop Variable Counter') will have itspublic final int endfield set to the length of the'srcStr'parameterString.
EXCEPTIONS: AnIndexOutOfBoundsExceptionwill be thrown if:- If
sPosis negative, or ifsPosis greater-than or equal-to the size of'srcStr' - If
ePosis zero, or greater than the size'srcStr'. - If
sPosis a larger integer thanePos
String tokenThis is the testing-substring that is this class' search goal. When this Stringis identified as a substring of the input-parameterString 'srcStr', a potential match has been found. In order for potential matches to be returned as results, they are subsequently tested forsurrounding white-space(or the additional'extraDelimiterTest'). The requirements for a potential match to be returned as aToken Matchare as follows:- The location of
'token'in'srcStr'must be bounded by white-space, or be located at the very beginning or ending of the'srcStr'. - If an
extraDelimiterTesthas been provided, the location of'token'in'srcStr'may also be bounded by characters that are a match with theCharacter-Predicate'test(char)'method. - And, of course, the
'token'must be a substring of'srcStr'
String... tokensEach of the 'token' String'spassed usingVarargs arrayparameter'tokens'must follow the exact same rules explained in the previous parameter entry (directly above) in order to be consideredtoken-matches with/for input parameter'srcStr'. All theVarargs String-Arrayadds is that it facilitates testing multipletokensall at the same time so that their comparison-results can beAND'ed,OR'ed,NAND'ed, etc...Predicate<Character> extraDelimiterTestWhen this parameter is present in the method-signature parameter-list, the decision of whether a Token-Matchis 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 theString 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 atoken-matchlocation to be bounded by characters that pass thisCharacter-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,andparenthesiswould all be allowed directly before or immediately after thetoken-matchlocation of the'token'parameter insideString 'srcStr'.
Hi-Lited Source-Code:- View Here: Torello/Java/StrTokCmpr.java
- Open New Browser-Tab: Torello/Java/StrTokCmpr.java
File Size: 97,400 Bytes Line Count: 2,027 '\n' Characters Found
Stateless Class:This class neither contains any program-state, nor can it be instantiated. The@StaticFunctionalAnnotation may also be called 'The Spaghetti Report'.Static-Functionalclasses are, essentially, C-Styled Files, without any constructors or non-static member fields. It is a concept very similar to the Java-Bean's@StatelessAnnotation.
- 1 Constructor(s), 1 declared private, zero-argument constructor
- 93 Method(s), 93 declared static
- 6 Field(s), 6 declared static, 4 declared final
- Fields excused from final modifier (with explanation):
Field 'DEBUG' is not final. Reason: DEBUGGING Field 'DEBUG_LOG' is not final. Reason: DEBUGGING
-
-
Method Summary
Contains Modifier and Type Method static booleancontains(String srcStr, String token)static booleancontainsAND(String srcStr, String... tokens)static booleancontainsNAND(String srcStr, String... tokens)static booleancontainsOR(String srcStr, String... tokens)static booleancontainsXOR(String srcStr, String... tokens)Contains: Ⅰ Range-Limited Modifier and Type Method static booleancontains(String srcStr, int sPos, int ePos, String token)static booleancontainsAND(String srcStr, int sPos, int ePos, String... tokens)static booleancontainsNAND(String srcStr, int sPos, int ePos, String... tokens)static booleancontainsOR(String srcStr, int sPos, int ePos, String... tokens)static booleancontainsXOR(String srcStr, int sPos, int ePos, String... tokens)Contains: Ⅱ Extra-Delimiter Test Modifier and Type Method static booleancontains(String srcStr, Predicate<Character> extraDelimiterTest, String token)static booleancontainsAND(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)static booleancontainsNAND(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)static booleancontainsOR(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)static booleancontainsXOR(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)Contains: Ⅰ Range-Limited Ⅱ Extra-Delimiter Test Modifier and Type Method static booleancontains(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String token)static booleancontainsAND(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)static booleancontainsNAND(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)static booleancontainsOR(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)static booleancontainsXOR(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)Contains: Ⅲ Case-Insensitive Modifier and Type Method static booleancontainsAND_CI(String srcStr, String... tokens)static booleancontainsIgnoreCase(String srcStr, String token)static booleancontainsNAND_CI(String srcStr, String... tokens)static booleancontainsOR_CI(String srcStr, String... tokens)static booleancontainsXOR_CI(String srcStr, String... tokens)Contains: Ⅰ Range-Limited Ⅲ Case-Insensitive Modifier and Type Method static booleancontainsAND_CI(String srcStr, int sPos, int ePos, String... tokens)static booleancontainsIgnoreCase(String srcStr, int sPos, int ePos, String token)static booleancontainsNAND_CI(String srcStr, int sPos, int ePos, String... tokens)static booleancontainsOR_CI(String srcStr, int sPos, int ePos, String... tokens)static booleancontainsXOR_CI(String srcStr, int sPos, int ePos, String... tokens)Contains: Ⅱ Extra-Delimiter Test Ⅲ Case-Insensitive Modifier and Type Method static booleancontainsAND_CI(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)static booleancontainsIgnoreCase(String srcStr, Predicate<Character> extraDelimiterTest, String token)static booleancontainsNAND_CI(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)static booleancontainsOR_CI(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)static booleancontainsXOR_CI(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)Contains: Ⅰ Range-Limited Ⅱ Extra-Delimiter Test Ⅲ Case-Insensitive Modifier and Type Method static booleancontainsAND_CI(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)static booleancontainsIgnoreCase(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String token)static booleancontainsNAND_CI(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)static booleancontainsOR_CI(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)static booleancontainsXOR_CI(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)Starts-With Modifier and Type Method static booleanstartsWith(String srcStr, String token)static booleanstartsWithNAND(String srcStr, String... tokens)static booleanstartsWithXOR(String srcStr, String... tokens)Starts-With: Ⅰ Range-Limited Modifier and Type Method static booleanstartsWith(String srcStr, int sPos, int ePos, String token)static booleanstartsWithNAND(String srcStr, int sPos, int ePos, String... tokens)static booleanstartsWithXOR(String srcStr, int sPos, int ePos, String... tokens)Starts-With: Ⅱ Extra-Delimiter Test Modifier and Type Method static booleanstartsWith(String srcStr, Predicate<Character> extraDelimiterTest, String token)static booleanstartsWithNAND(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)static booleanstartsWithXOR(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)Starts-With: Ⅰ Range-Limited Ⅱ Extra-Delimiter Test Modifier and Type Method static booleanstartsWith(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String token)static booleanstartsWithNAND(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)static booleanstartsWithXOR(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)Starts-With: Ⅲ Case-Insensitive Modifier and Type Method static booleanstartsWithIgnoreCase(String srcStr, String token)static booleanstartsWithNAND_CI(String srcStr, String... tokens)static booleanstartsWithXOR_CI(String srcStr, String... tokens)Starts-With: Ⅰ Range-Limited Ⅲ Case-Insensitive Modifier and Type Method static booleanstartsWithIgnoreCase(String srcStr, int sPos, int ePos, String token)static booleanstartsWithNAND_CI(String srcStr, int sPos, int ePos, String... tokens)static booleanstartsWithXOR_CI(String srcStr, int sPos, int ePos, String... tokens)Starts-With: Ⅱ Extra-Delimiter Test Ⅲ Case-Insensitive Modifier and Type Method static booleanstartsWithIgnoreCase(String srcStr, Predicate<Character> extraDelimiterTest, String token)static booleanstartsWithNAND_CI(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)static booleanstartsWithXOR_CI(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)Starts-With: Ⅰ Range-Limited Ⅱ Extra-Delimiter Test Ⅲ Case-Insensitive Modifier and Type Method static booleanstartsWithIgnoreCase(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String token)static booleanstartsWithNAND_CI(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)static booleanstartsWithXOR_CI(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)Ends-With Modifier and Type Method static booleanendsWith(String srcStr, String token)static booleanendsWithNAND(String srcStr, String... tokens)static booleanendsWithXOR(String srcStr, String... tokens)Ends-With: Ⅰ Range-Limited Modifier and Type Method static booleanendsWith(String srcStr, int sPos, int ePos, String token)static booleanendsWithNAND(String srcStr, int sPos, int ePos, String... tokens)static booleanendsWithXOR(String srcStr, int sPos, int ePos, String... tokens)Ends-With: Ⅱ Extra-Delimiter Test Modifier and Type Method static booleanendsWith(String srcStr, Predicate<Character> extraDelimiterTest, String token)static booleanendsWithNAND(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)static booleanendsWithXOR(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)Ends-With: Ⅰ Range-Limited Ⅱ Extra-Delimiter Test Modifier and Type Method static booleanendsWith(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String token)static booleanendsWithNAND(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)static booleanendsWithXOR(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)Ends-With: Ⅲ Case-Insensitive Modifier and Type Method static booleanendsWithIgnoreCase(String srcStr, String token)static booleanendsWithNAND_CI(String srcStr, String... tokens)static booleanendsWithXOR_CI(String srcStr, String... tokens)Ends-With: Ⅰ Range-Limited Ⅲ Case-Insensitive Modifier and Type Method static booleanendsWithIgnoreCase(String srcStr, int sPos, int ePos, String token)static booleanendsWithNAND_CI(String srcStr, int sPos, int ePos, String... tokens)static booleanendsWithXOR_CI(String srcStr, int sPos, int ePos, String... tokens)Ends-With: Ⅱ Extra-Delimiter Test Ⅲ Case-Insensitive Modifier and Type Method static booleanendsWithIgnoreCase(String srcStr, Predicate<Character> extraDelimiterTest, String token)static booleanendsWithNAND_CI(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)static booleanendsWithXOR_CI(String srcStr, Predicate<Character> extraDelimiterTest, String... tokens)Ends-With: Ⅰ Range-Limited Ⅱ Extra-Delimiter Test Ⅲ Case-Insensitive Modifier and Type Method static booleanendsWithIgnoreCase(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String token)static booleanendsWithNAND_CI(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)static booleanendsWithXOR_CI(String srcStr, int sPos, int ePos, Predicate<Character> extraDelimiterTest, String... tokens)Internal, Protected Methds. Provided for Reference, Only. Modifier and Type Method protected static booleanAND(String methodName, String srcStr, String[] tokens, Predicate<String> pred)protected static booleanNAND(String methodName, String srcStr, String[] tokens, Predicate<String> pred)protected static booleanOR(String methodName, String srcStr, String[] tokens, Predicate<String> pred)protected static booleanXOR(String methodName, String srcStr, String[] tokens, Predicate<String> pred)
-
-
-
Field Detail
-
DEBUG
public static boolean DEBUG
Utility field. You may choose to set this variable to true, and the followingStringcommands will print to an internally storedConsumer<String> DEBUG_LOGclass that may be set. This is generally a very minor drain on code-efficiency. When this flag is set toFALSE, a shortif-statement evaluationstill occurs even when the flag is false on each occasion that the string-comparison loops identify and return a match. This is very minor performance loss, and does provide quite a lot of help to those trying to identify difficult to notice problems with partial-Stringcomparisons.
Required Setting:
In order to use this minor Debugging Feature, it is necessary to provide aConsumer<String>to public fieldDEBUG_LOG! This field is apublicandstaticfield, which will be used by any invocation of the methods in this class. ThisString-consumer may do anything you would like it to do with the provided Debug-Stringdata.
String-Format:
TheStringthat is ultimately sent to theConsumer<String>you provide will be formatted, as below, in the following Code-Snippet:
private static void PRNT(String methodName, String srcStr, String compareStr) { DEBUG_LOG.accept(methodName + "-MATCH[" + srcStr + ", " + compareStr + "] "); }
Generally, you would assign a writer that looks like something the Lambda-Target / Function-Pointer assignment in the snippet below:
StrTokCmpr.DEBUG_LOG = (String logInfoStr) -> System.out.println(logInfoStr);
Finally, if you are using this field, please note that any of the methods whose name ends with the phrase "IgnoreCase" will not print to theDEBUG_LOG. This is primarily because these are all single-argument comparisons, and logging would be of only minor benefit.
The primary value of a debug-log is the ability to identify whether / when a particular substring from a list of substrings actually matched.- Code:
- Exact Field Declaration Expression:
public static boolean DEBUG = false;
-
DEBUG_LOG
public static java.util.function.Consumer<java.lang.String> DEBUG_LOG
This object reference cannot be null when DEBUG is TRUE. ThisStorageWriterwill receive text-notifications every time the string-comparing loops identify a match.
DEBUG_LOG is not Thread-Safe:
No attempt has been made to ensure that this debugging feature will operate perfectly in a multi-threaded environment. The two reasons for this are:- The primary purpose of this LOG is for debugging code, not putting details about string-match information into an 'on-line' or production environment.
- This is a best-efforts string-comparison package that would sacrifice quite a bit of its
utility if it were expected to maintain multiple instances of this class just to have
StrCmprdebug operations work in multiple-threads. Code readability necessitates keeping this a class with only static methods. - Two threads making calls to this
class StrCmprmight see log-writes that, sadly, look like they 'interlaced' (crashed), but even when this occasions, reading the log wouldn't be that difficult anyway.
- Code:
- Exact Field Declaration Expression:
public static Consumer<String> DEBUG_LOG = null;
-
AND
protected static final byte AND
Signifies that an'AND'operation is required, but only for methods that implement one of the'contains'variants.- See Also:
- Constant Field Values
- Code:
- Exact Field Declaration Expression:
protected static final byte AND = 0;
-
OR
protected static final byte OR
Signifies that an'AND'operation is required, but only for methods that implement one of the'contains'variants.- See Also:
- Constant Field Values
- Code:
- Exact Field Declaration Expression:
protected static final byte OR = 1;
-
NAND
protected static final byte NAND
Signifies that an'AND'operation is required, but only for methods that implement one of the'contains'variants.- See Also:
- Constant Field Values
- Code:
- Exact Field Declaration Expression:
protected static final byte NAND = 2;
-
XOR
protected static final byte XOR
Signifies that an'AND'operation is required, but only for methods that implement one of the'contains'variants.- See Also:
- Constant Field Values
- Code:
- Exact Field Declaration Expression:
protected static final byte XOR = 3;
-
-
Method Detail
-
AND
protected static boolean AND (java.lang.String methodName, java.lang.String srcStr, java.lang.String[] tokens, java.util.function.Predicate<java.lang.String> pred)
This performs the internal AND. It expects a comparisonPredicatein order for the comparison to work.- Parameters:
methodName- If printing-debug information is expected, by the DEBUG global-variable, thisStringis used.srcStr- This is the same source-string parameter from all the methods in this class.tokens- This is the same var-args string array from all the methods in this class.pred- This is the comparisonPredicateprovided by the methods in this class that call this method.- Returns:
- The AND of these
String's, using the providedPredicate. - Throws:
StrCmprException- This exception shall throw if there are any invalidString'sin the compare-string parameter array.Note: The conditions that would cause this exception to throw should remind the reader that each and every method here will throw exception'StrCmprException'if invalid input has been passed to the "Compare String" Variable-ArgumentsString...Parameter.- Code:
- Exact Method Body:
StrCmprException.check(tokens); for (String cmp: tokens) if (! pred.test(cmp)) { if (DEBUG) PRNT(methodName + "-MATCHFAIL", srcStr, cmp); return false; } return true;
-
NAND
protected static boolean NAND (java.lang.String methodName, java.lang.String srcStr, java.lang.String[] tokens, java.util.function.Predicate<java.lang.String> pred)
This performs the internal NAND. It expects a comparisonPredicatein order for the comparison to work.- Parameters:
methodName- If printing-debug information is expected, by the DEBUG global-variable, thisStringis used.srcStr- This is the same source-string parameter from all the methods in this class.tokens- This is the same var-args string array from all the methods in this class.pred- This is the comparisonPredicateprovided by the methods in this class that call this method.- Returns:
- The NAND of these
String's, using the providedPredicate. - Throws:
StrCmprException- This exception shall throw if there are any invalidString'sin the compare-string parameter array.Note: The conditions that would cause this exception to throw should remind the reader that each and every method here will throw exception'StrCmprException'if invalid input has been passed to the "Compare String" Variable-ArgumentsString...Parameter.- Code:
- Exact Method Body:
StrCmprException.check(tokens); for (String cmp: tokens) if (pred.test(cmp)) { if (DEBUG) PRNT(methodName + "-MATCH", srcStr, cmp); return false; } return true;
-
OR
protected static boolean OR (java.lang.String methodName, java.lang.String srcStr, java.lang.String[] tokens, java.util.function.Predicate<java.lang.String> pred)
This performs the internal OR. It expects a comparisonPredicatein order for the comparison to work.- Parameters:
methodName- If printing-debug information is expected, by the DEBUG global-variable, thisStringis used.srcStr- This is the same source-string parameter from all the methods in this class.tokens- This is the same var-args string array from all the methods in this class.pred- This is the comparisonPredicateprovided by the methods in this class that call this method.- Returns:
- The OR of these
String's, using the providedPredicate. - Throws:
StrCmprException- This exception shall throw if there are any invalidString'sin the compare-string parameter array.Note: The conditions that would cause this exception to throw should remind the reader that each and every method here will throw exception'StrCmprException'if invalid input has been passed to the "Compare String" Variable-ArgumentsString...Parameter.- Code:
- Exact Method Body:
StrCmprException.check(tokens); for (String cmp: tokens) if (pred.test(cmp)) { if (DEBUG) PRNT(methodName + "-MATCH", srcStr, cmp); return true; } return false;
-
XOR
protected static boolean XOR (java.lang.String methodName, java.lang.String srcStr, java.lang.String[] tokens, java.util.function.Predicate<java.lang.String> pred)
This performs the internal XOR. It expects a comparisonPredicatein order for the comparison to work.- Parameters:
methodName- If printing-debug information is expected, by the DEBUG global-variable, thisStringis used.srcStr- This is the same source-string parameter from all the methods in this class.tokens- This is the same var-args string array from all the methods in this class.pred- This is the comparisonPredicateprovided by the methods in this class that call this method.- Returns:
- The XOR of these
String's, using the providedPredicate. - Throws:
StrCmprException- This exception shall throw if there are any invalidString'sin the compare-string parameter array.Note: The conditions that would cause this exception to throw should remind the reader that each and every method here will throw exception'StrCmprException'if invalid input has been passed to the "Compare String" Variable-ArgumentsString...Parameter.- Code:
- Exact Method Body:
StrCmprException.check(tokens); int count=0; for (String cmp: tokens) if (pred.test(cmp)) if (++count > 1) { if (DEBUG) PRNT(methodName + "-MATCH", srcStr, cmp); return false; } return count == 1;
-
containsOR
public static boolean containsOR(java.lang.String srcStr, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'contains at least one of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
- Returns:
TRUEif'srcStr'contains at least one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
return TokCmprCN.CONTAINS(false, OR, srcStr, tokens);
-
containsAND
public static boolean containsAND(java.lang.String srcStr, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'contains every one of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
- Returns:
TRUEif'srcStr'contains every one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
return TokCmprCN.CONTAINS(false, AND, srcStr, tokens);
-
containsXOR
public static boolean containsXOR(java.lang.String srcStr, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'contains exactly one of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
- Returns:
TRUEif'srcStr'contains exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
return TokCmprCN.CONTAINS(false, XOR, srcStr, tokens);
-
containsNAND
public static boolean containsNAND(java.lang.String srcStr, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'does not contain any of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
- Returns:
TRUEif'srcStr'does not contain any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
return TokCmprCN.CONTAINS(false, NAND, srcStr, tokens);
-
containsOR_CI
public static boolean containsOR_CI(java.lang.String srcStr, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'contains at least one of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
- Returns:
TRUEif'srcStr'contains at least one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
return TokCmprCN.CONTAINS(true, OR, srcStr, tokens);
-
containsAND_CI
public static boolean containsAND_CI(java.lang.String srcStr, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'contains every one of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
- Returns:
TRUEif'srcStr'contains every one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
return TokCmprCN.CONTAINS(true, AND, srcStr, tokens);
-
containsXOR_CI
public static boolean containsXOR_CI(java.lang.String srcStr, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'contains exactly one of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
- Returns:
TRUEif'srcStr'contains exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
return TokCmprCN.CONTAINS(true, XOR, srcStr, tokens);
-
containsNAND_CI
public static boolean containsNAND_CI(java.lang.String srcStr, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'does not contain any of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
- Returns:
TRUEif'srcStr'does not contain any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
return TokCmprCN.CONTAINS(true, NAND, srcStr, tokens);
-
endsWithXOR
public static boolean endsWithXOR(java.lang.String srcStr, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'ends with exactly one of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-start (matching'^')
- Returns:
TRUEif'srcStr'ends with exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
XOR(String, String, String[], Predicate)- Code:
- Exact Method Body:
return XOR( "endsWithXOR", srcStr, tokens, cmp -> TokCmprEW.ew(srcStr, new LV(srcStr, 0, -1), cmp) );
-
endsWithNAND
public static boolean endsWithNAND(java.lang.String srcStr, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'does not end with any of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-start (matching'^')
- Returns:
TRUEif'srcStr'does not end with any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
NAND(String, String, String[], Predicate)- Code:
- Exact Method Body:
return NAND( "endsWithNAND", srcStr, tokens, cmp -> TokCmprEW.ew(srcStr, new LV(srcStr, 0, -1), cmp) );
-
startsWithXOR
public static boolean startsWithXOR(java.lang.String srcStr, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'starts with exactly one of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-terminus (matching'$')
- Returns:
TRUEif'srcStr'starts with exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
XOR(String, String, String[], Predicate)- Code:
- Exact Method Body:
return XOR( "startsWithXOR", srcStr, tokens, cmp -> TokCmprSW.sw(srcStr, new LV(srcStr, 0, -1), cmp) );
-
startsWithNAND
public static boolean startsWithNAND(java.lang.String srcStr, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'does not start with any of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-terminus (matching'$')
- Returns:
TRUEif'srcStr'does not start with any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
NAND(String, String, String[], Predicate)- Code:
- Exact Method Body:
return NAND( "startsWithNAND", srcStr, tokens, cmp -> TokCmprSW.sw(srcStr, new LV(srcStr, 0, -1), cmp) );
-
endsWithXOR_CI
public static boolean endsWithXOR_CI(java.lang.String srcStr, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'ends with exactly one of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-start (matching'^')
- Returns:
TRUEif'srcStr'ends with exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
endsWithIgnoreCase(String, String),XOR(String, String, String[], Predicate)- Code:
- Exact Method Body:
return XOR("endsWithXOR_CI", srcStr, tokens, cmp -> endsWithIgnoreCase(srcStr, cmp));
-
endsWithNAND_CI
public static boolean endsWithNAND_CI(java.lang.String srcStr, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'does not end with any of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-start (matching'^')
- Returns:
TRUEif'srcStr'does not end with any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
endsWithIgnoreCase(String, String),NAND(String, String, String[], Predicate)- Code:
- Exact Method Body:
return NAND("endsWithNAND_CI", srcStr, tokens, cmp -> endsWithIgnoreCase(srcStr, cmp));
-
startsWithXOR_CI
public static boolean startsWithXOR_CI(java.lang.String srcStr, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'starts with exactly one of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-terminus (matching'$')
- Returns:
TRUEif'srcStr'starts with exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
startsWithIgnoreCase(String, String),XOR(String, String, String[], Predicate)- Code:
- Exact Method Body:
return XOR("startsWithXOR_CI", srcStr, tokens, cmp -> startsWithIgnoreCase(srcStr, cmp));
-
startsWithNAND_CI
public static boolean startsWithNAND_CI(java.lang.String srcStr, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'does not start with any of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-terminus (matching'$')
- Returns:
TRUEif'srcStr'does not start with any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
startsWithIgnoreCase(String, String),NAND(String, String, String[], Predicate)- Code:
- Exact Method Body:
return NAND("startsWithNAND_CI", srcStr, tokens, cmp -> startsWithIgnoreCase(srcStr, cmp));
-
startsWith
public static boolean startsWith(java.lang.String srcStr, java.lang.String token)
Checks to ensure that'srcStr'starts with the'compareStr'token.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtoken- TheStringused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-terminus (matching'$')
- Returns:
TRUEif'srcStr'starts with the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
return srcStr.startsWith(token) && ( (token.length() == srcStr.length()) || Character.isWhitespace(srcStr.charAt(token.length())));
-
endsWith
public static boolean endsWith(java.lang.String srcStr, java.lang.String token)
Checks to ensure that'srcStr'ends with the'compareStr'token.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtoken- TheStringused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-start (matching'^')
- Returns:
TRUEif'srcStr'ends with the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
return srcStr.endsWith(token) && ( (token.length() == srcStr.length()) || (Character.isWhitespace(srcStr.charAt(srcStr.length() - token.length() - 1))));
-
contains
public static boolean contains(java.lang.String srcStr, java.lang.String token)
Checks to ensure that'srcStr'contains the'compareStr'token.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtoken- TheStringused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
- Returns:
TRUEif'srcStr'contains the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
int tokenLen = token.length(); int loopLen = srcStr.length() - tokenLen; for (int i=0; i <= loopLen; 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 true; return false;
-
startsWithIgnoreCase
public static boolean startsWithIgnoreCase(java.lang.String srcStr, java.lang.String token)
Checks to ensure that'srcStr'starts with the'compareStr'token.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtoken- TheStringused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-terminus (matching'$')
- Returns:
TRUEif'srcStr'starts with the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
return srcStr.regionMatches(true, 0, token, 0, token.length()) && ( (token.length() == srcStr.length()) || Character.isWhitespace(srcStr.charAt(token.length())));
-
endsWithIgnoreCase
public static boolean endsWithIgnoreCase(java.lang.String srcStr, java.lang.String token)
Checks to ensure that'srcStr'ends with the'compareStr'token.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtoken- TheStringused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-start (matching'^')
- Returns:
TRUEif'srcStr'ends with the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
int tokenLen = token.length(); int startPos = srcStr.length() - tokenLen; return srcStr.regionMatches(true, startPos, token, 0, tokenLen) && ( (tokenLen == srcStr.length()) || (Character.isWhitespace(srcStr.charAt(startPos - 1))));
-
containsIgnoreCase
public static boolean containsIgnoreCase(java.lang.String srcStr, java.lang.String token)
Checks to ensure that'srcStr'contains the'compareStr'token.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtoken- TheStringused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
- Returns:
TRUEif'srcStr'contains the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
return TokCmprCN.containsIgnoreCase(srcStr, new LV(srcStr, 0, srcStr.length()), token);
-
containsOR
public static boolean containsOR(java.lang.String srcStr, int sPos, int ePos, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), contains at least one of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePoscontains at least one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return TokCmprCN.CONTAINS_LV(false, OR, l, srcStr, tokens);
-
containsAND
public static boolean containsAND(java.lang.String srcStr, int sPos, int ePos, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), contains every one of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePoscontains every one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return TokCmprCN.CONTAINS_LV(false, AND, l, srcStr, tokens);
-
containsXOR
public static boolean containsXOR(java.lang.String srcStr, int sPos, int ePos, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), contains exactly one of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePoscontains exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return TokCmprCN.CONTAINS_LV(false, XOR, l, srcStr, tokens);
-
containsNAND
public static boolean containsNAND(java.lang.String srcStr, int sPos, int ePos, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), does not contain any of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosdoes not contain any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return TokCmprCN.CONTAINS_LV(false, NAND, l, srcStr, tokens);
-
containsOR_CI
public static boolean containsOR_CI(java.lang.String srcStr, int sPos, int ePos, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), contains at least one of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePoscontains at least one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return TokCmprCN.CONTAINS_LV(true, OR, l, srcStr, tokens);
-
containsAND_CI
public static boolean containsAND_CI(java.lang.String srcStr, int sPos, int ePos, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), contains every one of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePoscontains every one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return TokCmprCN.CONTAINS_LV(true, AND, l, srcStr, tokens);
-
containsXOR_CI
public static boolean containsXOR_CI(java.lang.String srcStr, int sPos, int ePos, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), contains exactly one of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePoscontains exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return TokCmprCN.CONTAINS_LV(true, XOR, l, srcStr, tokens);
-
containsNAND_CI
public static boolean containsNAND_CI(java.lang.String srcStr, int sPos, int ePos, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), does not contain any of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosdoes not contain any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return TokCmprCN.CONTAINS_LV(true, NAND, l, srcStr, tokens);
-
endsWithXOR
public static boolean endsWithXOR(java.lang.String srcStr, int sPos, int ePos, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), ends with exactly one of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-start (matching'^')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosends with exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
XOR(String, String, String[], Predicate)- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return XOR("endsWithXOR", srcStr, tokens, cmp -> TokCmprEW.ew(srcStr, l, cmp));
-
endsWithNAND
public static boolean endsWithNAND(java.lang.String srcStr, int sPos, int ePos, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), does not end with any of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-start (matching'^')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosdoes not end with any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
NAND(String, String, String[], Predicate)- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return NAND("endsWithNAND", srcStr, tokens, cmp -> TokCmprEW.ew(srcStr, l, cmp));
-
startsWithXOR
public static boolean startsWithXOR(java.lang.String srcStr, int sPos, int ePos, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), starts with exactly one of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-terminus (matching'$')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosstarts with exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
XOR(String, String, String[], Predicate)- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return XOR("startsWithXOR", srcStr, tokens, cmp -> TokCmprSW.sw(srcStr, l, cmp));
-
startsWithNAND
public static boolean startsWithNAND(java.lang.String srcStr, int sPos, int ePos, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), does not start with any of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-terminus (matching'$')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosdoes not start with any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
NAND(String, String, String[], Predicate)- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return NAND("startsWithNAND", srcStr, tokens, cmp -> TokCmprSW.sw(srcStr, l, cmp));
-
endsWithXOR_CI
public static boolean endsWithXOR_CI(java.lang.String srcStr, int sPos, int ePos, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), ends with exactly one of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-start (matching'^')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosends with exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
XOR(String, String, String[], Predicate)- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return XOR("endsWithXOR_CI", srcStr, tokens, cmp -> TokCmprEW.ew_CI(srcStr, l, cmp));
-
endsWithNAND_CI
public static boolean endsWithNAND_CI(java.lang.String srcStr, int sPos, int ePos, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), does not end with any of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-start (matching'^')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosdoes not end with any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
NAND(String, String, String[], Predicate)- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return NAND("endsWithNAND_CI", srcStr, tokens, cmp -> TokCmprEW.ew_CI(srcStr, l, cmp));
-
startsWithXOR_CI
public static boolean startsWithXOR_CI(java.lang.String srcStr, int sPos, int ePos, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), starts with exactly one of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-terminus (matching'$')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosstarts with exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
XOR(String, String, String[], Predicate)- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return XOR("startsWithXOR_CI", srcStr, tokens, cmp -> TokCmprSW.sw_CI(srcStr, l, cmp));
-
startsWithNAND_CI
public static boolean startsWithNAND_CI(java.lang.String srcStr, int sPos, int ePos, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), does not start with any of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-terminus (matching'$')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosdoes not start with any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
NAND(String, String, String[], Predicate)- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return NAND("startsWithNAND_CI", srcStr, tokens, cmp -> TokCmprSW.sw_CI(srcStr, l, cmp));
-
startsWith
public static boolean startsWith(java.lang.String srcStr, int sPos, int ePos, java.lang.String token)
Checks whether or not a substring of'srcStr'starts with the'compareStr'token. The substring that is checked is demarcated by'sPos'(inclusive), and'ePos'(exclusive).The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtoken- TheStringused in the comparison againstsrcStr
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-terminus (matching'$')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosstarts with the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
return TokCmprSW.sw(srcStr, new LV(srcStr, sPos, ePos), token);
-
startsWithIgnoreCase
public static boolean startsWithIgnoreCase(java.lang.String srcStr, int sPos, int ePos, java.lang.String token)
Checks whether or not a substring of'srcStr'starts with the'compareStr'token. The substring that is checked is demarcated by'sPos'(inclusive), and'ePos'(exclusive).The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtoken- TheStringused in the comparison againstsrcStr
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-terminus (matching'$')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosstarts with the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
return TokCmprSW.sw_CI(srcStr, new LV(srcStr, sPos, ePos), token);
-
endsWith
public static boolean endsWith(java.lang.String srcStr, int sPos, int ePos, java.lang.String token)
Checks whether or not a substring of'srcStr'ends with the'compareStr'token. The substring that is checked is demarcated by'sPos'(inclusive), and'ePos'(exclusive).The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtoken- TheStringused in the comparison againstsrcStr
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-start (matching'^')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosends with the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
return TokCmprEW.ew(srcStr, new LV(srcStr, sPos, ePos), token);
-
endsWithIgnoreCase
public static boolean endsWithIgnoreCase(java.lang.String srcStr, int sPos, int ePos, java.lang.String token)
Checks whether or not a substring of'srcStr'ends with the'compareStr'token. The substring that is checked is demarcated by'sPos'(inclusive), and'ePos'(exclusive).The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtoken- TheStringused in the comparison againstsrcStr
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these two values:
① white-space (matching'\s')
②String-start (matching'^')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosends with the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
return TokCmprEW.ew_CI(srcStr, new LV(srcStr, sPos, ePos), token);
-
contains
public static boolean contains(java.lang.String srcStr, int sPos, int ePos, java.lang.String token)
Checks whether or not a substring of'srcStr'contains the'compareStr'token. The substring that is checked is demarcated by'sPos'(inclusive), and'ePos'(exclusive).The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtoken- TheStringused in the comparison againstsrcStr
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePoscontains the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
return TokCmprCN.contains(srcStr, new LV(srcStr, sPos, ePos), token);
-
containsIgnoreCase
public static boolean containsIgnoreCase(java.lang.String srcStr, int sPos, int ePos, java.lang.String token)
Checks whether or not a substring of'srcStr'contains the'compareStr'token. The substring that is checked is demarcated by'sPos'(inclusive), and'ePos'(exclusive).The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.Stringtoken- TheStringused in the comparison againstsrcStr
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePoscontains the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
return TokCmprCN.containsIgnoreCase(srcStr, new LV(srcStr, sPos, ePos), token);
-
containsOR
public static boolean containsOR (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'contains at least one of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
④ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'contains at least one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
return TokCmprCN.CONTAINS(false, OR, srcStr, extraDelimiterTest, tokens);
-
containsAND
public static boolean containsAND (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'contains every one of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
④ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'contains every one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
return TokCmprCN.CONTAINS(false, AND, srcStr, extraDelimiterTest, tokens);
-
containsXOR
public static boolean containsXOR (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'contains exactly one of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
④ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'contains exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
return TokCmprCN.CONTAINS(false, XOR, srcStr, extraDelimiterTest, tokens);
-
containsNAND
public static boolean containsNAND (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'does not contain any of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
④ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'does not contain any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
return TokCmprCN.CONTAINS(false, NAND, srcStr, extraDelimiterTest, tokens);
-
containsOR_CI
public static boolean containsOR_CI (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'contains at least one of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
④ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'contains at least one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
return TokCmprCN.CONTAINS(true, OR, srcStr, extraDelimiterTest, tokens);
-
containsAND_CI
public static boolean containsAND_CI (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'contains every one of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
④ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'contains every one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
return TokCmprCN.CONTAINS(true, AND, srcStr, extraDelimiterTest, tokens);
-
containsXOR_CI
public static boolean containsXOR_CI (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'contains exactly one of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
④ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'contains exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
return TokCmprCN.CONTAINS(true, XOR, srcStr, extraDelimiterTest, tokens);
-
containsNAND_CI
public static boolean containsNAND_CI (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'does not contain any of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
④ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'does not contain any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
return TokCmprCN.CONTAINS(true, NAND, srcStr, extraDelimiterTest, tokens);
-
endsWithXOR
public static boolean endsWithXOR (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'ends with exactly one of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'ends with exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
XOR(String, String, String[], Predicate)- Code:
- Exact Method Body:
return XOR( "endsWithXOR", srcStr, tokens, cmp -> TokCmprEW.ew(srcStr, new LV(srcStr, 0, -1), extraDelimiterTest, cmp) );
-
endsWithNAND
public static boolean endsWithNAND (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'does not end with any of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'does not end with any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
NAND(String, String, String[], Predicate)- Code:
- Exact Method Body:
return NAND( "endsWithNAND", srcStr, tokens, cmp -> TokCmprEW.ew(srcStr, new LV(srcStr, 0, -1), extraDelimiterTest, cmp) );
-
startsWithXOR
public static boolean startsWithXOR (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'starts with exactly one of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-terminus (matching'$')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'starts with exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
XOR(String, String, String[], Predicate)- Code:
- Exact Method Body:
return XOR( "startsWithXOR", srcStr, tokens, cmp -> TokCmprSW.sw(srcStr, new LV(srcStr, 0, -1), extraDelimiterTest, cmp) );
-
startsWithNAND
public static boolean startsWithNAND (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'does not start with any of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-terminus (matching'$')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'does not start with any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
NAND(String, String, String[], Predicate)- Code:
- Exact Method Body:
return NAND( "startsWithNAND", srcStr, tokens, cmp -> TokCmprSW.sw(srcStr, new LV(srcStr, 0, -1), extraDelimiterTest, cmp) );
-
endsWithXOR_CI
public static boolean endsWithXOR_CI (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'ends with exactly one of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'ends with exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
endsWithIgnoreCase(String, String),XOR(String, String, String[], Predicate)- Code:
- Exact Method Body:
return XOR( "endsWithXOR_CI", srcStr, tokens, cmp -> endsWithIgnoreCase(srcStr, extraDelimiterTest, cmp) );
-
endsWithNAND_CI
public static boolean endsWithNAND_CI (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'does not end with any of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'does not end with any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
endsWithIgnoreCase(String, String),NAND(String, String, String[], Predicate)- Code:
- Exact Method Body:
return NAND( "endsWithNAND_CI", srcStr, tokens, cmp -> endsWithIgnoreCase(srcStr, extraDelimiterTest, cmp) );
-
startsWithXOR_CI
public static boolean startsWithXOR_CI (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'starts with exactly one of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-terminus (matching'$')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'starts with exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
startsWithIgnoreCase(String, Predicate, String),XOR(String, String, String[], Predicate)- Code:
- Exact Method Body:
return XOR( "startsWithXOR_CI", srcStr, tokens, cmp -> startsWithIgnoreCase(srcStr, extraDelimiterTest, cmp) );
-
startsWithNAND_CI
public static boolean startsWithNAND_CI (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that parameter'srcStr'does not start with any of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-terminus (matching'$')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'does not start with any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
startsWithIgnoreCase(String, Predicate, String),NAND(String, String, String[], Predicate)- Code:
- Exact Method Body:
return NAND( "startsWithNAND_CI", srcStr, tokens, cmp -> startsWithIgnoreCase(srcStr, extraDelimiterTest, cmp) );
-
startsWith
public static boolean startsWith (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String token)
Checks to ensure that'srcStr'starts with the'compareStr'token.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtoken- TheStringused in the comparison againstsrcStr
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-terminus (matching'$')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'starts with the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
return srcStr.startsWith(token) && ( (token.length() == srcStr.length()) || Character.isWhitespace(srcStr.charAt(token.length())) || extraDelimiterTest.test(srcStr.charAt(token.length())));
-
endsWith
public static boolean endsWith (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String token)
Checks to ensure that'srcStr'ends with the'compareStr'token.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtoken- TheStringused in the comparison againstsrcStr
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'ends with the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
int tokenLen = token.length(); return srcStr.endsWith(token) && ( ((srcStr.length() - tokenLen) == 0) || Character.isWhitespace(srcStr.charAt(srcStr.length() - tokenLen - 1)) || extraDelimiterTest.test(srcStr.charAt(srcStr.length() - tokenLen - 1)));
-
contains
public static boolean contains (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String token)
Checks to ensure that'srcStr'contains the'compareStr'token.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtoken- TheStringused in the comparison againstsrcStr
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
④ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'contains the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
int tokenLen = token.length(); int loopLen = srcStr.length() - tokenLen; for (int i=0; i <= loopLen; 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 true; return false;
-
startsWithIgnoreCase
public static boolean startsWithIgnoreCase (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String token)
Checks to ensure that'srcStr'starts with the'compareStr'token.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtoken- TheStringused in the comparison againstsrcStr
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-terminus (matching'$')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'starts with the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
return srcStr.regionMatches(true, 0, token, 0, token.length()) && ( (token.length() == srcStr.length()) || Character.isWhitespace(srcStr.charAt(token.length())) || extraDelimiterTest.test(srcStr.charAt(token.length())));
-
endsWithIgnoreCase
public static boolean endsWithIgnoreCase (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String token)
Checks to ensure that'srcStr'ends with the'compareStr'token.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtoken- TheStringused in the comparison againstsrcStr
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'ends with the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
int tokenLen = token.length(); return srcStr.regionMatches(true, srcStr.length() - tokenLen, token, 0, tokenLen) && ( ((srcStr.length() - tokenLen) == 0) || Character.isWhitespace(srcStr.charAt(srcStr.length() - tokenLen - 1)) || extraDelimiterTest.test(srcStr.charAt(srcStr.length() - tokenLen - 1)));
-
containsIgnoreCase
public static boolean containsIgnoreCase (java.lang.String srcStr, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String token)
Checks to ensure that'srcStr'contains the'compareStr'token.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtoken- TheStringused in the comparison againstsrcStr
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
④ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif'srcStr'contains the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
return TokCmprCN.containsIgnoreCase (srcStr, new LV(srcStr, 0, srcStr.length()), extraDelimiterTest, token);
-
containsOR
public static boolean containsOR (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), contains at least one of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
④ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePoscontains at least one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return TokCmprCN.CONTAINS(false, OR, l, srcStr, extraDelimiterTest, tokens);
-
containsAND
public static boolean containsAND (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), contains every one of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
④ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePoscontains every one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return TokCmprCN.CONTAINS(false, AND, l, srcStr, extraDelimiterTest, tokens);
-
containsXOR
public static boolean containsXOR (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), contains exactly one of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
④ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePoscontains exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return TokCmprCN.CONTAINS(false, XOR, l, srcStr, extraDelimiterTest, tokens);
-
containsNAND
public static boolean containsNAND (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), does not contain any of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
④ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosdoes not contain any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return TokCmprCN.CONTAINS(false, NAND, l, srcStr, extraDelimiterTest, tokens);
-
containsOR_CI
public static boolean containsOR_CI (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), contains at least one of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
④ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePoscontains at least one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return TokCmprCN.CONTAINS(true, OR, l, srcStr, extraDelimiterTest, tokens);
-
containsAND_CI
public static boolean containsAND_CI (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), contains every one of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
④ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePoscontains every one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return TokCmprCN.CONTAINS(true, AND, l, srcStr, extraDelimiterTest, tokens);
-
containsXOR_CI
public static boolean containsXOR_CI (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), contains exactly one of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
④ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePoscontains exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return TokCmprCN.CONTAINS(true, XOR, l, srcStr, extraDelimiterTest, tokens);
-
containsNAND_CI
public static boolean containsNAND_CI (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), does not contain any of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
④ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosdoes not contain any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return TokCmprCN.CONTAINS(true, NAND, l, srcStr, extraDelimiterTest, tokens);
-
endsWithXOR
public static boolean endsWithXOR (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), ends with exactly one of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosends with exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
XOR(String, String, String[], Predicate)- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return XOR( "endsWithXOR", srcStr, tokens, cmp -> TokCmprEW.ew(srcStr, l, extraDelimiterTest, cmp) );
-
endsWithNAND
public static boolean endsWithNAND (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), does not end with any of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosdoes not end with any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
NAND(String, String, String[], Predicate)- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return NAND( "endsWithNAND", srcStr, tokens, cmp -> TokCmprEW.ew(srcStr, l, extraDelimiterTest, cmp) );
-
startsWithXOR
public static boolean startsWithXOR (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), starts with exactly one of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-terminus (matching'$')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosstarts with exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
XOR(String, String, String[], Predicate)- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return XOR( "startsWithXOR", srcStr, tokens, cmp -> TokCmprSW.sw(srcStr, l, extraDelimiterTest, cmp) );
-
startsWithNAND
public static boolean startsWithNAND (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), does not start with any of the tokens supplied by the'tokens'array.The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-terminus (matching'$')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosdoes not start with any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
NAND(String, String, String[], Predicate)- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return NAND( "startsWithNAND", srcStr, tokens, cmp -> TokCmprSW.sw(srcStr, l, extraDelimiterTest, cmp) );
-
endsWithXOR_CI
public static boolean endsWithXOR_CI (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), ends with exactly one of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosends with exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
XOR(String, String, String[], Predicate)- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return XOR( "endsWithXOR_CI", srcStr, tokens, cmp -> TokCmprEW.ew_CI(srcStr, l, extraDelimiterTest, cmp) );
-
endsWithNAND_CI
public static boolean endsWithNAND_CI (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), does not ends with any of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosdoes not ends with any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
NAND(String, String, String[], Predicate)- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return NAND( "endsWithNAND_CI", srcStr, tokens, cmp -> TokCmprEW.ew_CI(srcStr, l, extraDelimiterTest, cmp) );
-
startsWithXOR_CI
public static boolean startsWithXOR_CI (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), starts with exactly one of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-terminus (matching'$')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosstarts with exactly one of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
XOR(String, String, String[], Predicate)- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return XOR( "startsWithXOR_CI", srcStr, tokens, cmp -> TokCmprSW.sw_CI(srcStr, l, extraDelimiterTest, cmp) );
-
startsWithNAND_CI
public static boolean startsWithNAND_CI (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String... tokens)
Checks to ensure that the'srcStr'substring, which is demarcated by'sPos'(inclusive) and'ePos'(exclusive), does not start with any of the tokens supplied by the'tokens'array.The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtokens- TheString'sused in the comparison against'srcStr'
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-terminus (matching'$')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosdoes not start with any of the user-provided tokens. Matches are only taken into consideration if they are delimited appropriately. Token-Matches are sufficient, while Sub-String-Matches are not.- See Also:
NAND(String, String, String[], Predicate)- Code:
- Exact Method Body:
final LV l = new LV(srcStr, sPos, ePos); return NAND( "startsWithNAND_CI", srcStr, tokens, cmp -> TokCmprSW.sw_CI(srcStr, l, extraDelimiterTest, cmp) );
-
startsWith
public static boolean startsWith (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String token)
Checks whether or not a substring of'srcStr'starts with the'compareStr'token. The substring that is checked is demarcated by'sPos'(inclusive), and'ePos'(exclusive).The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtoken- TheStringused in the comparison againstsrcStr
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-terminus (matching'$')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosstarts with the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
return TokCmprSW.sw(srcStr, new LV(srcStr, sPos, ePos), extraDelimiterTest, token);
-
startsWithIgnoreCase
public static boolean startsWithIgnoreCase (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String token)
Checks whether or not a substring of'srcStr'starts with the'compareStr'token. The substring that is checked is demarcated by'sPos'(inclusive), and'ePos'(exclusive).The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtoken- TheStringused in the comparison againstsrcStr
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that begins atsrcStr.charAt(0), it will check the character directly after that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-terminus (matching'$')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosstarts with the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
return TokCmprSW.sw_CI(srcStr, new LV(srcStr, sPos, ePos), extraDelimiterTest, token);
-
endsWith
public static boolean endsWith (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String token)
Checks whether or not a substring of'srcStr'ends with the'compareStr'token. The substring that is checked is demarcated by'sPos'(inclusive), and'ePos'(exclusive).The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtoken- TheStringused in the comparison againstsrcStr
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosends with the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
return TokCmprEW.ew(srcStr, new LV(srcStr, sPos, ePos), extraDelimiterTest, token);
-
endsWithIgnoreCase
public static boolean endsWithIgnoreCase (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String token)
Checks whether or not a substring of'srcStr'ends with the'compareStr'token. The substring that is checked is demarcated by'sPos'(inclusive), and'ePos'(exclusive).The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtoken- TheStringused in the comparison againstsrcStr
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match withinStringparameter'srcStr'that ends atsrcStr.charAt(srcStr.length() - 1), it will check the character immediately preceding that match in order to ensure that it assumes only one of these three values:
① white-space (matching'\s')
②String-start (matching'^')
③ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePosends with the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
return TokCmprEW.ew_CI(srcStr, new LV(srcStr, sPos, ePos), extraDelimiterTest, token);
-
contains
public static boolean contains (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String token)
Checks whether or not a substring of'srcStr'contains the'compareStr'token. The substring that is checked is demarcated by'sPos'(inclusive), and'ePos'(exclusive).The test performed here ** is ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtoken- TheStringused in the comparison againstsrcStr
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
④ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePoscontains the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
return TokCmprCN.contains(srcStr, new LV(srcStr, sPos, ePos), extraDelimiterTest, token);
-
containsIgnoreCase
public static boolean containsIgnoreCase (java.lang.String srcStr, int sPos, int ePos, java.util.function.Predicate<java.lang.Character> extraDelimiterTest, java.lang.String token)
Checks whether or not a substring of'srcStr'contains the'compareStr'token. The substring that is checked is demarcated by'sPos'(inclusive), and'ePos'(exclusive).The test performed here ** is not ** case-sensitive.- Parameters:
srcStr- Any non-null instance ofjava.lang.StringextraDelimiterTest- Can be used if characters other than white-space should be considered astoken-delimiters. UsefulCharPredicate'sto this parameter are, for example, tests to further allow punctuation - commas, periods, parenthesis, etc... as match boundaries.
UsefulPredicate'sto provide might include (but are not limited to) the following:
①Character::isSpaceChar(includes UNICODE White-Space)
②Character::isDigit
③c -> ".,:;!?()".contains(c) (Miscellaneous Punctuation)
④ Any character test of your choosingtoken- TheStringused in the comparison againstsrcStr
When this method makestokencomparisons using the inputString-token parameter(s), if the logic finds a match anywhere withinStringparameter'srcStr', it will check both the character immediately preceding and the character directly after that match in order to ensure that they assume only one of these four values:
① white-space (matching'\s')
②String-start (matching'^')
③String-terminus (matching'$')
④ anycharacterwhich passes the parameter-providedPredicate<Character>delimiter test
- Returns:
TRUEif the Sub-String consisting of the characters inside'srcStr', betweensPosandePoscontains the specified token. A match is only taken into consideration if it is delimited appropriately. A Token-Match is sufficient, while a Sub-String-Match is not.- Code:
- Exact Method Body:
return TokCmprCN.containsIgnoreCase (srcStr, new LV(srcStr, sPos, ePos), extraDelimiterTest, token);
-
-