Java Utililty Methods String Slash

List of utility methods to do String Slash

  1. HOME
  2. Java
  3. S
  4. String Slash

Description

The list of methods to do String Slash are organized into topic(s).

Method

String addSlashes(String text)
add Slashes
final StringBuffer sb = new StringBuffer(text.length() * 2);
final StringCharacterIterator iterator = new StringCharacterIterator(text);
char character = iterator.current();
while (character != StringCharacterIterator.DONE) {
 if (character == '"')
 sb.append("\\\"");
 else if (character == '\'')
 sb.append("\\\'");
...

AltStyle によって変換されたページ (->オリジナル) /