use of jadx.core.utils.StringUtils in project jadx by skylot.
the class StringUtilsTest method testStringUnescape.
@Test
@SuppressWarnings("AvoidEscapedUnicodeCharacters")
public void testStringUnescape() {
JadxArgs args = new JadxArgs();
args.setEscapeUnicode(true);
stringUtils = new StringUtils(args);
checkStringUnescape("", "");
checkStringUnescape("'", "'");
checkStringUnescape("a", "a");
checkStringUnescape("\n", "\\n");
checkStringUnescape("\t", "\\t");
checkStringUnescape("\r", "\\r");
checkStringUnescape("\b", "\\b");
checkStringUnescape("\f", "\\f");
checkStringUnescape("\\", "\\\\");
checkStringUnescape("\"", "\\\"");
checkStringUnescape("\u1234", "\\u1234");
}
use of jadx.core.utils.StringUtils in project jadx by skylot.
the class StringUtilsTest method testCharUnescape.
@Test
public void testCharUnescape() {
stringUtils = new StringUtils(new JadxArgs());
checkCharUnescape('a', "a");
checkCharUnescape(' ', " ");
checkCharUnescape('\n', "\\n");
checkCharUnescape('\'', "\\'");
assertThat(stringUtils.unescapeChar('\0'), is("0"));
}
Aggregations