- Sort Score
- Num 10 results
- Language All
Results 1 - 4 of 4 for CharEscaperBuilder (0.13 seconds)
-
guava/src/com/google/common/escape/CharEscaperBuilder.java
// The highest index we've seen so far. private int max = -1; /** Construct a new sparse array builder. */ public CharEscaperBuilder() { this.map = new HashMap<>(); } /** Add a new mapping from an index to an object to the escaping. */ @CanIgnoreReturnValue public CharEscaperBuilder addEscape(char c, String r) { map.put(c, checkNotNull(r)); if (c > max) { max = c; } return this;
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) -
guava-tests/test/com/google/common/escape/CharEscaperBuilderTest.java
import org.jspecify.annotations.NullUnmarked; @NullUnmarked public class CharEscaperBuilderTest extends TestCase { public void testAddEscapes() { char[] cs = {'a', 'b', 'c'}; CharEscaperBuilder builder = new CharEscaperBuilder().addEscapes(cs, "Z"); Escaper escaper = builder.toEscaper(); assertThat(escaper.escape("abcdef")).isEqualTo("ZZZdef"); }Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Tue Feb 18 15:41:04 GMT 2025 - 1.1K bytes - Click Count (0) -
android/guava/src/com/google/common/escape/CharEscaper.java
* called by the {@link #escape(String)} method when it discovers that escaping is required. It is * protected to allow subclasses to override the fastpath escaping function to inline their * escaping test. See {@link CharEscaperBuilder} for an example usage. * * @param s the literal string to be escaped * @param index the index to start escaping from * @return the escaped form of {@code string}Created: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Feb 13 15:45:16 GMT 2025 - 6.7K bytes - Click Count (0) -
android/guava/src/com/google/common/escape/UnicodeEscaper.java
* called by the {@link #escape(String)} method when it discovers that escaping is required. It is * protected to allow subclasses to override the fastpath escaping function to inline their * escaping test. See {@link CharEscaperBuilder} for an example usage. * * <p>This method is not reentrant and may only be invoked by the top level {@link * #escape(String)} method. * * @param s the literal string to be escapedCreated: Fri Dec 26 12:43:10 GMT 2025 - Last Modified: Thu Feb 13 15:45:16 GMT 2025 - 13.2K bytes - Click Count (0)