C 教程
C 庫函數(shù) int snprintf(char *str, size_t size, const char *format, ...) 設(shè)將可變參數(shù)(...)按照 format 格式化成字符串,并將字符串復(fù)制到 str 中,size 為要寫入的字符的最大數(shù)目,超過 size 會(huì)被截?cái)唷?/p>
下面是 snprintf() 函數(shù)的聲明。
int snprintf ( char * str, size_t size, const char * format, ... );