bidi library
Helpers for text that mixes Arabic and English (or digits) in one sentence.
Functions
-
isolateOppositeRuns(
String line, {bool? rtl}) → String - Wraps the runs that read the other way in Unicode isolates, so song titles, numbers, times and percentages keep their order inside a sentence.
-
isRtl(
String s) → bool -
True when the first strong letter of
sis Arabic. A text with no letters is not RTL. Only Arabic and Latin letters count as strong. -
stripBidiMarks(
String s) → String - Removes the isolate marks again, for copying text and for tests.