how to save data coming from CanBus into 1 string ?

this is my problem , how to save it into a array ot string
in the file it was easy - becasue I know how to write into a file .
but I don't know how to "save" into my own string so I can compare it after it.

this is what in the monitor

2234510 0x18FEF530 0x38 0x37 0x36 0x35 0x34 0x33 0x32 0x31

I want to save this line and "see" it as:

2234510-0x18FEF530-0x380x370x360x350x340x330x320x31

hope now it's more understoodable \ easy to understand :slight_smile:

What I have thought to do is this :

unsigned char FinalInfo[10];
unsigned char buf[8];

then

FinalInfo[0] = (rcvTime); 
FinalInfo[1] = (rxId);

for (int i = 0; i < len; i++) // print the data
    {
     
      if (buf[i] > 15)
      {
       
        Serial.print("0x");
        Serial.print(buf[i], HEX);
        myFile.print("0x");
        myFile.print(buf[i], HEX);
        FinalInfo [i+2] = (buf[i] , HEX);

      }
      else
      {
        Serial.print("0x0");
        Serial.print(buf[i], HEX);
        myFile.print("0x0");
        myFile.print(buf[i], HEX);
        FinalInfo [i+2] = (buf[i] , HEX);
      }

      //Serial.print("0x");
      //Serial.print(buf[i], HEX);

      Serial.print("\t");
    }
    Serial.println();
    myFile.close();

I know I can do it - but now how can I save it as ONE string?

in the end I would like to compare FinalInfo with known data

Thanks ,