OKW_Helper { public static Boolean matchString( String fpsPattern, String fpsStringToMatch ) { Boolean lvbReturn = false; try { Log.LogFunctionStartDebug("OKW_Helper.MatchStr", "String fpsPattern", fpsPattern, "String fpsStringToMatch", fpsStringToMatch); String pattern = "^" + fpsPattern.replace("*", ".*").replace("?", ".") + "$"; lvbReturn = fpsStringToMatch.matches(pattern); } finally { Log.LogFunctionEndDebug(lvbReturn); } return lvbReturn; }  static String Boolean2String( Boolean fpbTrueOrFalse ); static String getLeftFromDelimiterNumber( String fpsSource, String fpsDelimiter, Integer fpiCount ); static String getRightFromDelimiterNumber( String fpsSource, String fpsDelimiter, Integer fpiCount ); static Boolean compareListString( List<String> ListString1, List<String> ListString2 ); static String concatListString( ArrayList<String> fps_ListString2Concat, String fps_Delimiter ); static Boolean matchString( String fpsPattern, String fpsStringToMatch ); static Boolean matchStrIgnoreCase( String fpsPattern, String fpsStringToMatch ); static String removeBeginEndQuotations( String fps_StringinQuotations ); static ArrayList<String> StringArray2ListStr( String[] fpsStringArray ); static Boolean String2Boolean( String fpsTrueOrFalse ); static ArrayList<String> splitString(String fpsString2Split, String fpsSeparator); static String repeatString( char c, Integer n ); static String repeatString( String c, Integer n ); static Boolean isStringNullOrEmpty( String fpsString);  }
@Test public void tcMatchStr_SMS_CaseSensitve() { Boolean actual = false; Boolean expected = false; actual = OKW_Helper.matchString("*Hase*", "Fux, hASE, bär"); assertEquals(expected, actual); }
@Test public void tcMatchStr_SM_CaseSensitve() { Boolean actual = false; Boolean expected = false; actual = OKW_Helper.matchString("*Hase, bär", "Fux, Hase, Bär"); assertEquals(expected, actual); }