No matching definitions.

tur/range-string

stdlib/range-string.tur

owned String siblings for the tur/range formatters.

Since: v2 (string-adoption-stdlib-plan, batch 3)

defn

range-fmt-string

(range-fmt-string [lo-kind : int lo-val : int hi-kind : int hi-val : int] :)

render a pair of endpoint kinds/values in interval

lo-kind0 unbounded, 1 inclusive, 2 exclusive (low endpoint)
lo-vallow endpoint value (ignored when unbounded)
hi-kind0 unbounded, 1 inclusive, 2 exclusive (high endpoint)
hi-valhigh endpoint value (ignored when unbounded)

An owned String, e.g. "[1, 5)".

(string/to-cstr (range-fmt-string 1 1 2 5))  ; => "[1, 5)"

Since: v2

defn

range->str-string

(range->str-string [r : int] :)

render a Range in interval notation, as an owned String.

ran :int Range pointer

An owned String, e.g. "[1, 5)".

(string/to-cstr (range->str-string (closed-open-range 1 5)))  ; => "[1, 5)"

Since: v2

defn

bound-fmt-string

(bound-fmt-string [kind : int v : int] :)

render a single inclusive/exclusive endpoint, as an

kind1 inclusive, 2 exclusive
vthe endpoint value

An owned String, e.g. "[3" or "(3".

(string/to-cstr (bound-fmt-string 1 3))  ; => "[3"

Since: v2

defn

bound-show-fmt-string

(bound-show-fmt-string [kind : int v : int] :)

render a single inclusive/exclusive endpoint (the

kind1 inclusive, 2 exclusive
vthe endpoint value

An owned String, e.g. "[3" or "(3".

(string/to-cstr (bound-show-fmt-string 2 3))  ; => "(3"

Since: v2