:sig
function nibble(haystack : string, delim : string) string

:params
haystack : the string to split
delim : the delimiter

:returns
the text before the first delimiter

:content
`nibble()` returns the text before the first `delim`.

It does not change `haystack`. If `delim` does not occur, it returns all of `haystack`.

:example capy render
var path := "docs/index"
print(nibble(path, "/"), "\n")

:see-group
strings

:see
>string
map
print
