MCPcopy Create free account
hub / github.com/codeaashu/claude-code / hasRTLCharacters

Function hasRTLCharacters

src/ink/bidi.ts:131–139  ·  view source on GitHub ↗

* Quick check for RTL characters (Hebrew, Arabic, and related scripts). * Avoids running the full bidi algorithm on pure-LTR text.

(text: string)

Source from the content-addressed store, hash-verified

129 * Avoids running the full bidi algorithm on pure-LTR text.
130 */
131function hasRTLCharacters(text: string): boolean {
132 // Hebrew: U+0590-U+05FF, U+FB1D-U+FB4F
133 // Arabic: U+0600-U+06FF, U+0750-U+077F, U+08A0-U+08FF, U+FB50-U+FDFF, U+FE70-U+FEFF
134 // Thaana: U+0780-U+07BF
135 // Syriac: U+0700-U+074F
136 return /[\u0590-\u05FF\uFB1D-\uFB4F\u0600-\u06FF\u0750-\u077F\u08A0-\u08FF\uFB50-\uFDFF\uFE70-\uFEFF\u0780-\u07BF\u0700-\u074F]/u.test(
137 text,
138 )
139}
140

Callers 1

reorderBidiFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected