Package icyllis.modernui.text
Interface TextDirectionHeuristic
public interface TextDirectionHeuristic
Interface for objects that use a heuristic for guessing at the paragraph direction by examining text.
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisRtl(char[] array, int start, int count) Guess if a chars array is in the RTL direction or not.booleanisRtl(CharSequence cs, int start, int count) Guess if aCharSequenceis in the RTL direction or not.
-
Method Details
-
isRtl
boolean isRtl(char[] array, int start, int count) Guess if a chars array is in the RTL direction or not.- Parameters:
array- the char array.start- start index, inclusive.count- the length to check, must not be negative and not greater thanarray.length - start.- Returns:
- true if all chars in the range are to be considered in a RTL direction, false otherwise.
-
isRtl
Guess if aCharSequenceis in the RTL direction or not.- Parameters:
cs- the CharSequence.start- start index, inclusive.count- the length to check, must not be negative and not greater thanCharSequence.length() - start.- Returns:
- true if all chars in the range are to be considered in a RTL direction, false otherwise.
-