/* This function will copy string no more than n bytes.  */
char* rt_strncpy(char *dst, const char *src, rt_size_t n)
/* This function will copy string no more than n bytes.  */
char* rt_strncpy(char *dst, const char *src, rt_size_t n)
{
    if (n != 0)
    {
        char *d = dst;
        const char *s = src;
        do
        {
            if ((*d++ = *s++) == 0)
            {
                while (--n != 0)
                {
                    *d++ = 0;
                }
                break;
            }
        } while (--n != 0);
    }
    return (dst);
}