public void matchPlainTextIgnoreCase (@Nonnull final String [] aSearchTexts, @Nonnull final Locale aDisplayLocale, @Nonnull final BitSet aMatchingWords) { for (int i = 0; i < aSearchTexts.length; ++i) { final String sSearchText = aSearchTexts[i]; if (StringHelper.containsIgnoreCase (m_sTextContent, sSearchText, aDisplayLocale)) aMatchingWords.set (i); } }
public void matchPlainTextIgnoreCase (@Nonnull final String [] aSearchTexts, @Nonnull final Locale aDisplayLocale, @Nonnull final BitSet aMatchingWords) { // Ensure text is resolved final String sTextContent = getTextContent (); for (int i = 0; i < aSearchTexts.length; ++i) { final String sSearchText = aSearchTexts[i]; if (StringHelper.containsIgnoreCase (sTextContent, sSearchText, aDisplayLocale)) aMatchingWords.set (i); } }
/** * Match method for a single string. By default a case-insensitive lookup is * performed. * * @param sSource * The source string to search the search term in. Never * <code>null</code>. * @param sSearchTerm * The search term to be searched. Never <code>null</code>. * @return <code>true</code> if the source string contains the search term, * <code>false</code> otherwise. */ @OverrideOnDemand protected boolean isSingleStringMatching (@Nonnull final String sSource, @Nonnull final String sSearchTerm) { return StringHelper.containsIgnoreCase (sSource, sSearchTerm, m_aSortLocale); }
/** * Match method for a single string. By default a case-insensitive lookup is * performed. * * @param sSource * The source string to search the search term in. Never * <code>null</code>. * @param sSearchTerm * The search term to be searched. Never <code>null</code>. * @return <code>true</code> if the source string contains the search term, * <code>false</code> otherwise. */ @OverrideOnDemand protected boolean isSingleStringMatching (@Nonnull final String sSource, @Nonnull final String sSearchTerm) { return StringHelper.containsIgnoreCase (sSource, sSearchTerm, m_aSortLocale); }
public static void setInlineStyle (@Nonnull final IMicroNodeWithChildren aElement, @Nullable final String sContent, @Nonnull final EHCStyleInlineMode eMode) { if (StringHelper.hasText (sContent)) switch (eMode) { case PLAIN_TEXT: aElement.appendText (sContent); break; case PLAIN_TEXT_NO_ESCAPE: if (StringHelper.containsIgnoreCase (sContent, "</script>", Locale.US)) throw new IllegalArgumentException ("The script text contains a closing script tag!"); aElement.appendChild (new MicroText (sContent).setEscape (false)); break; } }
break; case PLAIN_TEXT_NO_ESCAPE: if (StringHelper.containsIgnoreCase (sContent, "</script>", Locale.US)) throw new IllegalArgumentException ("The script text contains a closing script tag: " + sContent); aElement.appendChild (new MicroText (sContent).setEscape (false));