字符串打印(定长)

目的:
打印长度可控的字符串

char  *ucBuf;
uint8_t  ucLen; 
char ucString[256];
memcpy(ucString,  ucBuf,  ucLen);
ucString [ucLen] = '\0';
printf("%s\r\n", ucString);

你可能感兴趣的:(C语言,c语言,stm32)