Home
last modified time | relevance | path

Searched refs:escaper (Results 1 – 10 of 10) sorted by relevance

/external/guava/guava-testlib/src/com/google/common/escape/testing/
DEscaperAsserts.java48 public static void assertBasic(Escaper escaper) throws IOException { in assertBasic() argument
50 Assert.assertEquals("", escaper.escape("")); in assertBasic()
53 escaper.escape((String) null); in assertBasic()
68 public static void assertEscaping(CharEscaper escaper, String expected, in assertEscaping() argument
71 String escaped = computeReplacement(escaper, c); in assertEscaping()
82 public static void assertUnescaped(CharEscaper escaper, char c) { in assertUnescaped() argument
83 Assert.assertNull(computeReplacement(escaper, c)); in assertUnescaped()
94 public static void assertEscaping(UnicodeEscaper escaper, String expected, in assertEscaping() argument
97 String escaped = computeReplacement(escaper, cp); in assertEscaping()
108 public static void assertUnescaped(UnicodeEscaper escaper, int cp) { in assertUnescaped() argument
[all …]
/external/guava/guava/src/com/google/common/escape/
DEscapers.java182 static UnicodeEscaper asUnicodeEscaper(Escaper escaper) { in asUnicodeEscaper() argument
183 checkNotNull(escaper); in asUnicodeEscaper()
184 if (escaper instanceof UnicodeEscaper) { in asUnicodeEscaper()
185 return (UnicodeEscaper) escaper; in asUnicodeEscaper()
186 } else if (escaper instanceof CharEscaper) { in asUnicodeEscaper()
187 return wrap((CharEscaper) escaper); in asUnicodeEscaper()
192 escaper.getClass().getName()); in asUnicodeEscaper()
205 public static String computeReplacement(CharEscaper escaper, char c) { in computeReplacement() argument
206 return stringOrNull(escaper.escape(c)); in computeReplacement()
219 public static String computeReplacement(UnicodeEscaper escaper, int cp) { in computeReplacement() argument
[all …]
/external/guava/guava-tests/test/com/google/common/escape/
DEscapersTest.java33 Escaper escaper = Escapers.nullEscaper(); in testNullEscaper() local
34 EscaperAsserts.assertBasic(escaper); in testNullEscaper()
36 assertEquals("null escaper should have no effect", s, escaper.escape(s)); in testNullEscaper()
41 Escaper escaper = Escapers.builder().setSafeRange('a', 'z').build(); in testBuilderInitialStateNoReplacement() local
42 assertEquals("The Quick Brown Fox", escaper.escape("The Quick Brown Fox")); in testBuilderInitialStateNoReplacement()
47 Escaper escaper = Escapers.builder().setUnsafeReplacement("X").build(); in testBuilderInitialStateNoneUnsafe() local
48 assertEquals("\0\uFFFF", escaper.escape("\0\uFFFF")); in testBuilderInitialStateNoneUnsafe()
DArrayBasedUnicodeEscaperTest.java45 UnicodeEscaper escaper = new ArrayBasedUnicodeEscaper(SIMPLE_REPLACEMENTS, in testReplacements() local
51 EscaperAsserts.assertBasic(escaper); in testReplacements()
53 escaper.escape("\tFish & Chips\n")); in testReplacements()
57 assertEquals(safeChars, escaper.escape(safeChars)); in testReplacements()
62 escaper.escape(badUnicode); in testReplacements()
DCharEscaperBuilderTest.java26 Escaper escaper = builder.toEscaper(); in testAddEscapes() local
27 assertEquals("ZZZdef", escaper.escape("abcdef")); in testAddEscapes()
/external/jsilver/src/com/google/clearsilver/jsilver/functions/
DFunctionRegistry.java60 TextFilter escaper = escapers.get(name); in escape() local
61 if (escaper == null) { in escape()
64 escaper.filter(input, output); in escape()
146 public void registerEscapeMode(String name, TextFilter escaper) { in registerEscapeMode() argument
148 escapers.put(name, escaper); in registerEscapeMode()
/external/desugar/java/com/google/devtools/common/options/
DOptionsUsage.java196 Escaper escaper, in getUsageHtml() argument
208 usage.append("=").append(escaper.escape(valueDescription)); in getUsageHtml()
211 usage.append("=<").append(escaper.escape(typeDescription)).append("&gt"); in getUsageHtml()
228 usage.append(" default: \"").append(escaper.escape(defaultValueString)).append("\""); in getUsageHtml()
236 escaper.escape(optionDefinition.getHelpText()), /*indent=*/ 0, /*width=*/ 80)); in getUsageHtml()
258 .append(escaper.escape(exp)) in getUsageHtml()
DOptionsParser.java416 Map<String, String> categoryDescriptions, Escaper escaper) { in describeOptionsHtmlWithDeprecatedCategories() argument
439 desc.append(escaper.escape(description)).append(":\n"); in describeOptionsHtmlWithDeprecatedCategories()
446 OptionsUsage.getUsageHtml(optionDefinition, desc, escaper, impl.getOptionsData(), false); in describeOptionsHtmlWithDeprecatedCategories()
459 public String describeOptionsHtml(Escaper escaper, String productName) { in describeOptionsHtml() argument
474 desc.append(escaper.escape(categoryDescription)).append(":\n"); in describeOptionsHtml()
478 OptionsUsage.getUsageHtml(optionDef, desc, escaper, impl.getOptionsData(), true); in describeOptionsHtml()
/external/snakeyaml/src/main/java/org/yaml/snakeyaml/util/
DUriEncoder.java38 private static final Escaper escaper = new PercentEscaper(SAFE_CHARS, false); field in UriEncoder
44 return escaper.escape(uri); in encode()
/external/jsilver/src/com/google/clearsilver/jsilver/
DJSilver.java409 public void registerGlobalEscaper(String name, TextFilter escaper) { in registerGlobalEscaper() argument
410 globalFunctions.registerFunction(name + "_escape", escaper, true); in registerGlobalEscaper()
411 globalFunctions.registerEscapeMode(name, escaper); in registerGlobalEscaper()