无符号字符数组如何转换成字符串
例如:有一个unsigned char nc[6] = {'a','b','c','d','e','f'};
String s = "";
如何使得nc转换成 s = "abcdef";字符串呢?
[解决办法]
unsigned char nc[6] = {'a','b','c','d','e','f'};String s = (char *)nc;
[解决办法]
unsigned char nc[6] = {'a','b','c','d','e','f'};
String s = (char *)nc;
感觉有越界风险,最好最后加个'\0'结束字符
[解决办法]
10毫秒也太短了