Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 245 for escaped (0.21 sec)

  1. android/guava-testlib/src/com/google/common/escape/testing/EscaperAsserts.java

       * @param cp the Unicode code point to escape
       */
      public static void assertEscaping(UnicodeEscaper escaper, String expected, int cp) {
    
        String escaped = computeReplacement(escaper, cp);
        Assert.assertNotNull(escaped);
        Assert.assertEquals(expected, escaped);
      }
    
      /**
       * Asserts that an escaper does not escape the given character.
       *
       * @param escaper the non-null escaper to test
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 3.8K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/escape/UnicodeEscaper.java

            }
            if (escaped.length > 0) {
              System.arraycopy(escaped, 0, dest, destIndex, escaped.length);
              destIndex += escaped.length;
            }
            // If we dealt with an escaped character, reset the unescaped range.
            unescapedChunkStart = nextIndex;
          }
          index = nextEscapeIndex(s, nextIndex, end);
        }
    
        // Process trailing unescaped characters - no need to account for escaped
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 13.2K bytes
    - Viewed (0)
  3. android/guava/src/com/google/common/escape/Escaper.java

       * @throws IllegalArgumentException if {@code string} contains badly formed UTF-16 or cannot be
       *     escaped for any other reason
       */
      public abstract String escape(String string);
    
      private final Function<String, String> asFunction = this::escape;
    
      /** Returns a {@link Function} that invokes {@link #escape(String)} on this escaper. */
      public final Function<String, String> asFunction() {
        return asFunction;
      }
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Fri Oct 01 16:02:17 GMT 2021
    - 4.6K bytes
    - Viewed (0)
  4. android/guava/src/com/google/common/escape/CharEscaper.java

    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
       * @return the escaped form of {@code string}
       * @throws NullPointerException if {@code string} is null
       */
      @Override
      public String escape(String string) {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 6.7K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/escape/testing/EscaperAsserts.java

       * @param cp the Unicode code point to escape
       */
      public static void assertEscaping(UnicodeEscaper escaper, String expected, int cp) {
    
        String escaped = computeReplacement(escaper, cp);
        Assert.assertNotNull(escaped);
        Assert.assertEquals(expected, escaped);
      }
    
      /**
       * Asserts that an escaper does not escape the given character.
       *
       * @param escaper the non-null escaper to test
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 3.8K bytes
    - Viewed (0)
  6. android/guava-tests/test/com/google/common/xml/XmlEscapersTest.java

        // Test quotes are escaped.
        assertEquals("&quot;test&quot;", xmlAttributeEscaper.escape("\"test\""));
        assertEquals("&apos;test&apos;", xmlAttributeEscaper.escape("\'test'"));
        // Test all escapes
        assertEquals(
            "a&quot;b&lt;c&gt;d&amp;e&quot;f&apos;", xmlAttributeEscaper.escape("a\"b<c>d&e\"f'"));
        // Test '\t', '\n' and '\r' are escaped.
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Dec 16 19:54:45 GMT 2020
    - 4.7K bytes
    - Viewed (0)
  7. guava-tests/test/com/google/common/escape/ArrayBasedUnicodeEscaperTest.java

              }
            };
        EscaperAsserts.assertBasic(escaper);
        assertEquals("<tab>Fish <and> Chips<newline>", escaper.escape("\tFish & Chips\n"));
    
        // Verify that everything else is left unescaped.
        String safeChars = "\0\u0100\uD800\uDC00\uFFFF";
        assertEquals(safeChars, escaper.escape(safeChars));
    
        // Ensure that Unicode escapers behave correctly wrt badly formed input.
        String badUnicode = "\uDC00\uD800";
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Feb 07 23:02:38 GMT 2024
    - 5K bytes
    - Viewed (1)
  8. guava-tests/test/com/google/common/xml/XmlEscapersTest.java

        // Test quotes are escaped.
        assertEquals("&quot;test&quot;", xmlAttributeEscaper.escape("\"test\""));
        assertEquals("&apos;test&apos;", xmlAttributeEscaper.escape("\'test'"));
        // Test all escapes
        assertEquals(
            "a&quot;b&lt;c&gt;d&amp;e&quot;f&apos;", xmlAttributeEscaper.escape("a\"b<c>d&e\"f'"));
        // Test '\t', '\n' and '\r' are escaped.
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Mon Dec 04 17:37:03 GMT 2017
    - 4.7K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/net/PercentEscaper.java

    import com.google.common.escape.UnicodeEscaper;
    import javax.annotation.CheckForNull;
    
    /**
     * A {@code UnicodeEscaper} that escapes some set of Java characters using a UTF-8 based percent
     * encoding scheme. The set of safe characters (those which remain unescaped) can be specified on
     * construction.
     *
     * <p>This class is primarily used for creating URI escapers in {@link UrlEscapers} but can be used
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Mon Oct 10 19:45:10 GMT 2022
    - 8.7K bytes
    - Viewed (0)
  10. android/guava-tests/test/com/google/common/escape/ArrayBasedUnicodeEscaperTest.java

              }
            };
        EscaperAsserts.assertBasic(escaper);
        assertEquals("<tab>Fish <and> Chips<newline>", escaper.escape("\tFish & Chips\n"));
    
        // Verify that everything else is left unescaped.
        String safeChars = "\0\u0100\uD800\uDC00\uFFFF";
        assertEquals(safeChars, escaper.escape(safeChars));
    
        // Ensure that Unicode escapers behave correctly wrt badly formed input.
        String badUnicode = "\uDC00\uD800";
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Wed Feb 07 23:02:38 GMT 2024
    - 5K bytes
    - Viewed (0)
Back to top