Copy string in accordance with xPL.
Copies the C string pointed by src into the array pointed by dst, including the terminating null character (and stopping at that point). src must contain only the following characters: A-Z, a-z, 0-9 and "-" (letters, numbers and the hyphen/dash character - ASCII 45). If this is not the case, the copying is interrupted and -1 is returned.
- Parameters
-
dst | This is the pointer to an array of char elements where the resulting C string is stored. |
src | source string |
- Returns
- If successful, the total number of characters written is returned excluding the null-character appended at the end of the string, otherwise a negative number is returned in case of failure.