(rontolisp) docs
← Functions

uiop:first-char

(uiop:first-char s)

Returns the first character of the string s, or nil when s is empty or is not a string. UIOP's one-liner, kept verbatim from upstream, so the "is there a first character" test and the access are one call rather than a length guard plus a char.

The mirror image is uiop:last-char; quri's render-uri calls both (plus uiop:emptyp) to decide whether a path needs a leading slash.

Backend support

Works on all four backends: it is a uiop library definition written in rontolisp itself and compiled into the program when used.