title: the best way for character replacement in String in java
body: <p>I want to check a string  for each character I replace it with other characters or keep it in the string. and also because it's a long string the time to do this task is so important. what is the best way of these, or any better idea?
  for all of them I append the result to an StringBuilder.
  check all of the characters with a for and charAt commands.
  use switch like the previous way.
  use replaceAll twice.</p>
  
  <p>and if one of the first to methods is better is there any way to check a character with a group of characters, like :
  if (st.charAt(i)=='a'..'z') ....</p>
  
  <p>Edit:
  please tell the less consuming in time way and tell the reason.I know all of these ways you said!</p>