tur/range-bound-string
stdlib/range-bound-string.tur
owned-String rendering for a single Bound endpoint.
Since: v2 (string-owned-builders-and-optional-accessors-plan, Part 2)
defn
bound->str-string
(bound->str-string [b : Bound] :)
render a single Bound endpoint as a fresh owned String.
Parameters
| b | a (Bound int) |
Returns
A fresh owned String (rc 1); release it or hand it to a container.
Example
(string/to-cstr (bound->str-string (bound-inclusive 3))) ; => "[3" (string/to-cstr (bound->str-string (bound-unbounded))) ; => "unbounded"
Since: v2