Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for CharEscaper (0.05 sec)

  1. android/guava/src/com/google/common/escape/CharEscaper.java

     *
     * @author Sven Mawson
     * @since 15.0
     */
    @GwtCompatible
    @SuppressWarnings("EscapedEntity") // We do mean for the user to see "<" etc.
    public abstract class CharEscaper extends Escaper {
      /** Constructor for use by subclasses. */
      protected CharEscaper() {}
    
      /**
       * Returns the escaped form of a given literal string.
       *
       * @param string the literal string to be escaped
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Feb 13 15:45:16 UTC 2025
    - 6.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/xml/XmlEscapersTest.java

    @GwtCompatible
    @NullUnmarked
    public class XmlEscapersTest extends TestCase {
    
      public void testXmlContentEscaper() throws Exception {
        CharEscaper xmlContentEscaper = (CharEscaper) XmlEscapers.xmlContentEscaper();
        assertBasicXmlEscaper(xmlContentEscaper, false, false);
        // Test quotes are not escaped.
        assertEquals("\"test\"", xmlContentEscaper.escape("\"test\""));
        assertEquals("'test'", xmlContentEscaper.escape("'test'"));
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Fri Dec 05 22:03:28 UTC 2025
    - 4.8K bytes
    - Viewed (0)
  3. guava-tests/test/com/google/common/escape/ArrayBasedCharEscaperTest.java

              '\n', "<newline>",
              '\t', "<tab>",
              '&', "<and>");
    
      public void testSafeRange() throws IOException {
        // Basic escaping of unsafe chars (wrap them in {,}'s)
        CharEscaper wrappingEscaper =
            new ArrayBasedCharEscaper(NO_REPLACEMENTS, 'A', 'Z') {
              @Override
              protected char[] escapeUnsafe(char c) {
                return ("{" + c + "}").toCharArray();
              }
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Feb 18 15:41:04 UTC 2025
    - 3.6K bytes
    - Viewed (0)
  4. guava/src/com/google/common/escape/CharEscaperBuilder.java

     * CharEscaper based on the generated array.
     *
     * @author Sven Mawson
     * @since 15.0
     */
    @GwtCompatible
    public final class CharEscaperBuilder {
      /**
       * Simple decorator that turns an array of replacement char[]s into a CharEscaper, this results in
       * a very fast escape method.
       */
      private static final class CharArrayDecorator extends CharEscaper {
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Jul 17 15:26:41 UTC 2025
    - 3.9K bytes
    - Viewed (0)
  5. android/guava-tests/test/com/google/common/escape/EscapersTest.java

        assertThat(second.escape("The Quick Brown Fox!")).isEqualTo("Xhe-Xuick-Xrown-Xox$");
      }
    
      // A trivial non-optimized escaper for testing.
      static CharEscaper createSimpleCharEscaper(ImmutableMap<Character, char[]> replacementMap) {
        return new CharEscaper() {
          @Override
          protected char[] escape(char c) {
            return replacementMap.get(c);
          }
        };
      }
    
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue May 13 18:46:00 UTC 2025
    - 4.1K bytes
    - Viewed (0)
  6. android/guava/src/com/google/common/escape/UnicodeEscaper.java

     * resulting XML document is parsed, the parser API will return this text as the original literal
     * string {@code "Foo<Bar>"}.
     *
     * <p><b>Note:</b> This class is similar to {@link CharEscaper} but with one very important
     * difference. A CharEscaper can only process Java <a
     * href="http://en.wikipedia.org/wiki/UTF-16">UTF16</a> characters in isolation and may not cope
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Thu Feb 13 15:45:16 UTC 2025
    - 13.2K bytes
    - Viewed (0)
Back to top