Wrap a line for display
Render-ready bidirectional output for one display line. Every left-to-right unit (a Latin term, a price, a number with its unit, a range such as "10–20%", a date, a percentage, a comparison such as "<5") is kept whole and in order, so no digit, range or sign is reversed or mirrored inside a Hebrew line.
Pick format for the surface: html for the web, React and webviews; isolate (Unicode isolates) for iOS, Android 7+ and current browsers; marks (LRM/RLM) for older Android, embedded displays and any renderer you cannot test. Pass base: "rtl" for a Hebrew line even when it starts with a Latin term.
Quota. Deterministic, no model. Does not consume the character quota. Fast enough to call per line at render time.
Limits. text up to 20,000 characters. Idempotent.
Request
- Base URL: https://hc.itsbaba.com
- URL: https://hc.itsbaba.com/v1/wrap
- Auth: HTTP bearer
Request body
Example request
{
"text": "הנחה: 10–20% על Galaxy S25 עד 31/12",
"format": "html",
"base": "rtl"
}Response
Wrapped output
Example response
{
"dir": "rtl",
"format": "html",
"output": "<span dir=\"rtl\">הנחה: <span dir=\"ltr\" lang=\"und\">10–20%</span> על <span dir=\"ltr\" lang=\"en\">Galaxy S25</span> עד <span dir=\"ltr\" lang=\"und\">31/12</span></span>",
"runs": [
{
"text": "שלום ",
"dir": "rtl",
"script": "Hebr",
"lang": "he",
"end": 5
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.