The "old" C functions are : strcpy, strcat, strlen, sscanf, and so on.
They operate on a zero-terminated string. That is an array with text and a zero at the end.
They are often called: a string.
They operate on buffers in memory. You have to provide those buffers.
https://www.arduino.cc/reference/en/language/variables/data-types/string/
The Arduino String class is something totally different.
They allocate and release memory when needed.
https://www.arduino.cc/reference/en/language/variables/data-types/stringobject/
Your Heltec LoRA32 software made a bad choice for getting the data.
In your sketch and in the examples, they retrieve data via the Arduino String class and then they convert that to a zero-terminated string. If they would give a zero-terminated string, that would make it easier.
This is another way to get that LoRa data into a normal zero-terminated string.
What is the maximum length of the data ?
Let's say it is 80.
byte buffer[80];
void loop()
{
int packetSize = LoRa.parsePacket();
if( packetSize > 0)
{
if( (packetSize + 1)> sizeof( buffer)) // plus one, because of the zero-terminator
{
Serial.println( "The message is too long, it does not fit in the buffer");
}
else
{
int index;
for( index = 0; index < packetSize; index++)
{
buffer[index] = LoRa.read();
}
buffer[index] = '\0'; // add the zero-terminator
}
}
}