code: public static boolean containsStyle(final String styleNames,
                                          final String style) {
          if (styleNames == null || style == null) {
              return false;
          }
  
          final String[] styles = styleNames.split("\\s");
  
          for (final String s : styles) {
              if (style.equals(s)) {
                  return true;
              }
          }
  
          return false;
      }
docs: Returns {@code true} if specified style is contained in space-separated list of styles
  
  @param styleNames Space-separated list of styles
  @param style      Style to look for
  @return True if contains style