KinsokuProcessor class
Kinsoku processor for CJK line-breaking rules
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
adjustBreakPoints(
String text, List< int> originalBreaks) → List<int> - Process a line of text and return adjusted break points
-
canBreakBetween(
String current, String next) → bool - Check if a break is allowed between two characters.
-
cannotEndLine(
String char) → bool - Check if a character cannot end a line
-
cannotStartLine(
String char) → bool - Check if a character cannot start a line
-
containsCjk(
String text) → bool - Check if text contains any CJK characters.
-
findBreakPoint(
String text, int preferredPosition) → int - Find the best break point in a string near a given position.
-
isCjkCharacter(
String char) → bool - Check if a character is a CJK character.
-
isCjkCodeUnit(
int code) → bool -
Returns true if
code(a UTF-16 code unit) belongs to a CJK or East-Asian script that requires character-level line breaking. -
isHangable(
String char) → bool - Check if a character is eligible for hanging punctuation
Constants
- hangable → const String
- Characters eligible for Hanging Punctuation (ぶら下がり).
- inseparable → const String
- Characters that must not be split if they appear consecutively (分離禁止).
-
inseparablePairs
→ const Map<
String, String> - Matching bracket/quote pairs that must not be split across lines (分離禁止).
- kinsokuEnd → const String
- Characters that cannot end a line (行末禁則文字).
- kinsokuStart → const String
- Characters that cannot start a line (行頭禁則文字).