文字の配列をバイトに、またはその逆に変換する最良の方法は何ですか?
解決:
void CharToByte(char* chars, byte* bytes, unsigned int count){
for(unsigned int i = 0; i < count; i++)
bytes[i] = (byte)chars[i];
}
void ByteToChar(byte* bytes, char* chars, unsigned int count){
for(unsigned int i = 0; i < count; i++)
chars[i] = (char)bytes[i];
}