Creates a new reference counted string and copies the contents of
into it, up to
Since this function does not stop at nul bytes, it is the caller’s
responsibility to ensure that
str has at least
len addressable bytes.
Available since: 2.58
The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string.
strto use, or -1 if