code: @Nullable
    public static String replaceAll (@Nullable final String sInputString,
                                     final char cSearchChar,
                                     final char cReplacementChar)
    {
      // Is input string empty?
      if (hasNoText (sInputString))
        return sInputString;
  
      // Replace old with the same new?
      if (cSearchChar == cReplacementChar)
        return sInputString;
  
      // Does the old text occur anywhere?
      int nIndex = sInputString.indexOf (cSearchChar, 0);
      if (nIndex == STRING_NOT_FOUND)
        return sInputString;
  
      // build output buffer
      final StringBuilder ret = new StringBuilder (sInputString.length ());
      int nOldIndex = 0;
      do
      {
        ret.append (sInputString, nOldIndex, nIndex).append (cReplacementChar);
        nIndex++;
        nOldIndex = nIndex;
        nIndex = sInputString.indexOf (cSearchChar, nIndex);
      } while (nIndex != STRING_NOT_FOUND);
      ret.append (sInputString, nOldIndex, sInputString.length ());
      return ret.toString ();
    }
docs: This is a fast replacement for {@link String#replace(char, char)} for
  characters. The problem with the mentioned String method is, that is uses
  internally regular expressions which use a synchronized block to compile the
  patterns. This method is inherently thread safe since {@link String} is
  immutable and we're operating on different temporary {@link StringBuilder}
  objects.
  
  @param sInputString
  The input string where the text should be replace. If this parameter
  is <code>null</code> or empty, no replacement is done.
  @param cSearchChar
  The character to be replaced.
  @param cReplacementChar
  The character with the replacement.
  @return The input string as is, if the input string is empty or if the search
  pattern and the replacement are equal or if the string to be replaced
  is not contained.