/* History: <time> <version > <author> <desc>  1.0 Kingvan.Tong build this file  */
unsigned int uvc_strlcpy(char *dest, const char *src, unsigned int size)
/* History: <time> <version > <author> <desc>  1.0 Kingvan.Tong build this file  */
unsigned int uvc_strlcpy(char *dest, const char *src, unsigned int size)
{
    unsigned int ret = strlen(src);
    if (size) {
        unsigned int len = (ret >= size) ? size - 1 : ret;
        memcpy(dest, src, len);
        dest[len] = '\0';
    }
    return ret;
}