@FunctionalInterface public interface StopCharsTester
Modifier and Type | Method and Description |
---|---|
default @NotNull StopCharsTester |
escaping()
Creates a new that respects escape characters in the string parsing operation.
|
boolean |
isStopChar(int ch,
int peekNextCh)
Determines whether the provided character should cause the string parsing operation to stop.
|
boolean isStopChar(int ch, int peekNextCh)
For safety reasons, it is advised that a byte of value 0 should either be defined as a stop character or should throw an IllegalStateException to prevent issues with null-terminated strings.
ch
- the character to test. If this is 0, it should return true or throw an exception.peekNextCh
- the next character that would be parsed after 'ch'. It can be used for context aware stopping, like identifying escape sequences.@NotNull default @NotNull StopCharsTester escaping()
Copyright © 2024. All rights reserved.