Commit Graph
1 Commits
Author SHA1 Message Date
Antonio PallaresandCursor ee1e91f0aa Add rc.split custom operator (#7473)
Splits a string into an array of fields, keeping empty ones, so rules can
target locale subtags, product-id namespaces and similar composite values.

A var path cannot index the result of an expression, so a positional field
is read by wrapping the array in a one-element list and letting an
iteration operator rebind scope to it. The array is also usable directly
by in and by the iteration operators.

Fields are never coerced to numbers, and a non-string operand or empty
separator throws typeMismatch rather than splitting into characters.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-24 09:47:39 +02:00