cpp/string/basic string view/copy

Copies the substring to the character array pointed to by, where  is the smaller of  and.

Equivalent to.

Return value
Number of characters copied.

Exceptions
std if.

Complexity
Linear in.