API Reference
Class
OfficeTextLineBreaks
Dependency-free Unicode line-break opportunities shared by OfficeIMO renderers.
Inheritance
- Object
- OfficeTextLineBreaks
Remarks
The implementation deliberately covers deterministic, high-value boundaries rather than claiming the complete Unicode Line Breaking Algorithm. It never splits a surrogate pair or grapheme cluster and applies common CJK punctuation constraints.
Methods
GetBreakPositions 2 overloads
public static IReadOnlyList<Int32> GetBreakPositions(String text) #Returns:
IReadOnlyList<Int32>Returns safe UTF-16 indexes where an unspaced token can wrap without inserting text.
Parameters
- text System.String
public static IReadOnlyList<Int32> GetBreakPositions(String text, Boolean allowCjkBreaks) #Returns:
IReadOnlyList<Int32>Returns safe UTF-16 indexes where an unspaced token can wrap without inserting text, optionally excluding boundaries introduced only by CJK characters.
Parameters
- text System.String
- allowCjkBreaks System.Boolean
public static Boolean IsValidBreakPosition(String text, Int32 position) #Returns:
BooleanReturns true when an index is a non-edge grapheme-cluster boundary.
Parameters
- text System.String
- position System.Int32
Inherited Methods
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object