Package com.gophers.utilities
Class TextProcessor
java.lang.Object
com.gophers.utilities.TextProcessor
Utility class for processing and comparing text strings.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancompareString(String expected, String actual) Compares two strings by checking if the sanitized actual string contains the sanitized expected string.static booleanmatchString(String expected, String actual) Compares two strings by checking if they are identical after sanitization.
-
Constructor Details
-
TextProcessor
public TextProcessor()Default constructor for TextProcessor class. Initializes a new instance of the TextProcessor.
-
-
Method Details
-
compareString
Compares two strings by checking if the sanitized actual string contains the sanitized expected string.- Parameters:
expected- The expected substring to look for.actual- The string to be checked for containing the expected substring.- Returns:
- True if the actual string contains the expected substring, false otherwise.
-
matchString
Compares two strings by checking if they are identical after sanitization.- Parameters:
expected- The expected string.actual- The actual string to compare.- Returns:
- True if the sanitized strings are identical, false otherwise.
-