code: public static String capitalizeWords(String str, char[] delimiters) {
          int delimLen = (delimiters == null ? -1 : delimiters.length);
          if ((str == null) || (str.length() == 0) || (delimLen == 0)) {
              return str;
          }
          int strLen = str.length();
          StringBuffer buffer = new StringBuffer(strLen);
          boolean capitalizeNext = true;
          for (int i = 0; i < strLen; i++) {
              char ch = str.charAt(i);
  
              if (isDelimiter(ch, delimiters)) {
                  buffer.append(ch);
                  capitalizeNext = true;
              } else if (capitalizeNext) {
                  buffer.append(Character.toTitleCase(ch));
                  capitalizeNext = false;
              } else {
                  buffer.append(ch);
              }
          }
          return buffer.toString();
      }
docs: <p>
  Capitalizes all the delimiter separated words in a String. Only the first letter of each word is changed.
  </p>
  <p/>
  <p>
  The delimiters represent a set of characters understood to separate words. The first string character and the
  first non-delimiter character after a delimiter will be capitalized.
  </p>
  <p/>
  <p>
  A <code>null</code> input String returns <code>null</code>. Capitalization uses the unicode title case, normally
  equivalent to upper case.
  </p>
  <p/>
  <pre>
  WordUtils.capitalize(null, *)            = null
  WordUtils.capitalize("", *)              = ""
  WordUtils.capitalize(*, new char[0])     = *
  WordUtils.capitalize("i am fine", null)  = "I Am Fine"
  WordUtils.capitalize("i aM.fine", {'.'}) = "I aM.Fine"
  </pre>
  
  @param str        the String to capitalize, may be null
  @param delimiters set of characters to determine capitalization, null means whitespace
  @return capitalized String, <code>null</code> if null String input