code: public static String initials(final String str, final char... delimiters) {
          if (StringUtils.isEmpty(str)) {
              return str;
          }
          if (delimiters != null && delimiters.length == 0) {
              return StringUtils.EMPTY;
          }
          final int strLen = str.length();
          final char[] buf = new char[strLen / 2 + 1];
          int count = 0;
          boolean lastWasGap = true;
          for (int i = 0; i < strLen; i++) {
              final char ch = str.charAt(i);
  
              if (isDelimiter(ch, delimiters)) {
                  lastWasGap = true;
              } else if (lastWasGap) {
                  buf[count++] = ch;
                  lastWasGap = false;
              } else {
                  continue; // ignore ch
              }
          }
          return new String(buf, 0, count);
      }
docs: <p>Extracts the initial characters from each word in the String.</p>
  
  <p>All first characters after the defined delimiters are returned as a new string.
  Their case is not changed.</p>
  
  <p>If the delimiters array is null, then Whitespace is used.
  Whitespace is defined by {@link Character#isWhitespace(char)}.
  A <code>null</code> input String returns <code>null</code>.
  An empty delimiter array returns an empty String.</p>
  
  <pre>
  WordUtils.initials(null, *)                = null
  WordUtils.initials("", *)                  = ""
  WordUtils.initials("Ben John Lee", null)   = "BJL"
  WordUtils.initials("Ben J.Lee", null)      = "BJ"
  WordUtils.initials("Ben J.Lee", [' ','.']) = "BJL"
  WordUtils.initials(*, new char[0])         = ""
  </pre>
  
  @param str  the String to get initials from, may be null
  @param delimiters  set of characters to determine words, null means whitespace
  @return String of initial characters, <code>null</code> if null String input
  @see #initials(String)
  @since 2.2