- Sort Score
- Num 10 results
- Language All
Results 1 - 9 of 9 for CharEscaper (0.05 seconds)
-
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 escapedCreated: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Feb 13 15:45:16 GMT 2025 - 6.7K bytes - Click Count (0) -
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'")); }Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Fri Dec 05 22:03:28 GMT 2025 - 4.8K bytes - Click Count (0) -
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(); }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Feb 18 15:41:04 GMT 2025 - 3.6K bytes - Click Count (0) -
android/guava-testlib/src/com/google/common/escape/testing/EscaperAsserts.java
*/ package com.google.common.escape.testing; import static com.google.common.escape.Escapers.computeReplacement; import com.google.common.annotations.GwtCompatible; import com.google.common.escape.CharEscaper; import com.google.common.escape.Escaper; import com.google.common.escape.UnicodeEscaper; import java.io.IOException; import junit.framework.Assert; /** * Extra assert methods for testing Escaper implementations.
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Jan 18 20:55:09 GMT 2022 - 3.8K bytes - Click Count (0) -
guava-testlib/src/com/google/common/escape/testing/EscaperAsserts.java
*/ package com.google.common.escape.testing; import static com.google.common.escape.Escapers.computeReplacement; import com.google.common.annotations.GwtCompatible; import com.google.common.escape.CharEscaper; import com.google.common.escape.Escaper; import com.google.common.escape.UnicodeEscaper; import java.io.IOException; import junit.framework.Assert; /** * Extra assert methods for testing Escaper implementations.
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Jan 18 20:55:09 GMT 2022 - 3.8K bytes - Click Count (0) -
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 {Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Jul 17 15:26:41 GMT 2025 - 3.9K bytes - Click Count (0) -
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); } }; }
Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue May 13 18:46:00 GMT 2025 - 4.1K bytes - Click Count (0) -
android/guava/src/com/google/common/escape/ArrayBasedCharEscaper.java
import static com.google.common.base.Preconditions.checkNotNull; import com.google.common.annotations.GwtCompatible; import java.util.Map; import org.jspecify.annotations.Nullable; /** * A {@link CharEscaper} that uses an array to quickly look up replacement characters for a given * {@code char} value. An additional safe range is provided that determines whether {@code char}Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Sun Dec 22 03:38:46 GMT 2024 - 6.2K bytes - Click Count (0) -
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 copeCreated: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Feb 13 15:45:16 GMT 2025 - 13.2K bytes - Click Count (0)