> @aktau I think you should return the length to allow truncation check in strlcpys fashion.

Sure, could be handy, edited.