Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 21 - 30 of 185 for Escaper (0.07 seconds)

  1. 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) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Feb 13 15:45:16 GMT 2025
    - 6.7K bytes
    - Click Count (0)
  2. guava-tests/test/com/google/common/net/PercentEscaperTest.java

        assertUnicodeEscaping(e, "%F4%8F%BF%BF", '\uDBFF', '\uDFFF');
    
        // simple string tests
        assertThat(e.escape("")).isEqualTo("");
        assertThat(e.escape("safestring")).isEqualTo("safestring");
        assertThat(e.escape("embedded\0null")).isEqualTo("embedded%00null");
        assertThat(e.escape("max\uffffchar")).isEqualTo("max%EF%BF%BFchar");
      }
    
      /** Tests the various ways that the space character can be handled */
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 15:59:55 GMT 2026
    - 5.4K bytes
    - Click Count (0)
  3. guava-tests/test/com/google/common/net/UrlEscaperTesting.java

        assertThat(e.escape("")).isEqualTo("");
        assertThat(e.escape("safestring")).isEqualTo("safestring");
        assertThat(e.escape("embedded\0null")).isEqualTo("embedded%00null");
        assertThat(e.escape("max\uffffchar")).isEqualTo("max%EF%BF%BFchar");
      }
    
      // Helper to assert common expected behaviour of uri escapers.
      static void assertBasicUrlEscaper(UnicodeEscaper e) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 15:59:55 GMT 2026
    - 3.7K bytes
    - Click Count (0)
  4. android/guava-tests/test/com/google/common/net/PercentEscaperTest.java

        assertUnicodeEscaping(e, "%F4%8F%BF%BF", '\uDBFF', '\uDFFF');
    
        // simple string tests
        assertThat(e.escape("")).isEqualTo("");
        assertThat(e.escape("safestring")).isEqualTo("safestring");
        assertThat(e.escape("embedded\0null")).isEqualTo("embedded%00null");
        assertThat(e.escape("max\uffffchar")).isEqualTo("max%EF%BF%BFchar");
      }
    
      /** Tests the various ways that the space character can be handled */
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 15:59:55 GMT 2026
    - 5.4K bytes
    - Click Count (0)
  5. android/guava/src/com/google/common/escape/package-info.java

     * the License.
     */
    
    /**
     * Interfaces, utilities, and simple implementations of escapers and encoders. The primary type is
     * {@link Escaper}.
     *
     * <p>Additional escapers implementations are found in the applicable packages: {@link
     * com.google.common.html.HtmlEscapers} in {@code com.google.common.html}, {@link
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sat Dec 21 14:50:24 GMT 2024
    - 1.3K bytes
    - Click Count (0)
  6. android/guava-tests/test/com/google/common/net/UrlEscaperTesting.java

        assertThat(e.escape("")).isEqualTo("");
        assertThat(e.escape("safestring")).isEqualTo("safestring");
        assertThat(e.escape("embedded\0null")).isEqualTo("embedded%00null");
        assertThat(e.escape("max\uffffchar")).isEqualTo("max%EF%BF%BFchar");
      }
    
      // Helper to assert common expected behaviour of uri escapers.
      static void assertBasicUrlEscaper(UnicodeEscaper e) {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 15:59:55 GMT 2026
    - 3.7K bytes
    - Click Count (0)
  7. android/guava/src/com/google/common/escape/ArrayBasedUnicodeEscaper.java

     * highest valued code point that requires escaping. For example a replacement map containing the
     * single character '{@code \}{@code u1000}' will require approximately 16K of memory. If you need
     * to create multiple escaper instances that have the same character replacement mapping consider
     * using {@link ArrayBasedEscaperMap}.
     *
     * @author David Beaumont
     * @since 15.0
     */
    @GwtCompatible
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Feb 13 15:45:16 GMT 2025
    - 8.5K bytes
    - Click Count (0)
  8. android/guava/src/com/google/common/escape/ArrayBasedCharEscaper.java

       */
      @Override
      public final String escape(String s) {
        checkNotNull(s); // GWT specific check (do not optimize).
        for (int i = 0; i < s.length(); i++) {
          char c = s.charAt(i);
          if ((c < replacementsLength && replacements[c] != null) || c > safeMax || c < safeMin) {
            return escapeSlow(s, i);
          }
        }
        return s;
      }
    
      /**
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Sun Dec 22 03:38:46 GMT 2024
    - 6.2K bytes
    - Click Count (0)
  9. guava-tests/test/com/google/common/xml/XmlEscapersTest.java

        // Test quotes are escaped.
        assertThat(xmlAttributeEscaper.escape("\"test\"")).isEqualTo("&quot;test&quot;");
        assertThat(xmlAttributeEscaper.escape("'test'")).isEqualTo("&apos;test&apos;");
        // Test all escapes
        assertThat(xmlAttributeEscaper.escape("a\"b<c>d&e\"f'"))
            .isEqualTo("a&quot;b&lt;c&gt;d&amp;e&quot;f&apos;");
        // Test '\t', '\n' and '\r' are escaped.
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 5K bytes
    - Click Count (0)
  10. android/guava-tests/test/com/google/common/xml/XmlEscapersTest.java

        // Test quotes are escaped.
        assertThat(xmlAttributeEscaper.escape("\"test\"")).isEqualTo("&quot;test&quot;");
        assertThat(xmlAttributeEscaper.escape("'test'")).isEqualTo("&apos;test&apos;");
        // Test all escapes
        assertThat(xmlAttributeEscaper.escape("a\"b<c>d&e\"f'"))
            .isEqualTo("a&quot;b&lt;c&gt;d&amp;e&quot;f&apos;");
        // Test '\t', '\n' and '\r' are escaped.
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Thu Mar 12 17:47:10 GMT 2026
    - 5K bytes
    - Click Count (0)
Back to Top