Java String Unescape unescape(final CharSequence target)

Here you can find the source of unescape(final CharSequence target)

Description

unescape

License

Open Source License

Declaration

public static CharSequence unescape(final CharSequence target) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {

    public static CharSequence unescape(final CharSequence target) {
        final StringBuilder buff = builder();
        final int len = target.length();
        for (int i = 0; i < len; i++) {
            final char ch = target.charAt(i);
            if (ch == '#') {
                i++;/*from ww  w.j a v a2 s.  c  o  m*/
                buff.append(target.charAt(i));
            } else {
                buff.append(ch);
            }
        }
        return buff;
    }

    public static StringBuilder builder() {
        return new StringBuilder();
    }
}

Related

  1. unescape(final String aSpecification)
  2. unescape(final String input)
  3. unescape(final String name)
  4. unescape(final String s)