If you're programming in C, then: Copy Code. strncpy( q, p, 499 ); q[499] = '\0'; will do the trick and work however long the string is.
確定! 回上一頁