public static String intelligentCapitalize(String pText)
  {
    boolean lDoCap = false;
    final StringTokenizer lST = new StringTokenizer(pText, ".- ", true);
    final StringBuffer lSB = new StringBuffer(50);
    while(lST.hasMoreTokens())
    {
      String lWord = lST.nextToken();

      if(lWord.equals(".") || lWord.equals("-"))
      {
        lDoCap = true;
        lSB.append(lWord);
        continue;
      }
      if(lWord.equals(" "))
      {
        lDoCap = false;
        lSB.append(lWord);
        continue;
      }

      if(lDoCap || (lWord.length() > 3))
      {
        lSB.append(Character.toUpperCase(lWord.charAt(0)));
        lSB.append(lWord.substring(1).toLowerCase());
      } else
      {
        if(fsNoCap.contains(lWord.toLowerCase()))
        {
          lSB.append(lWord.toLowerCase());
        } else
        {
          lSB.append(lWord.toUpperCase());
        }
      }
    }

    return lSB.toString();
  }