confused by String and pointer

I found an example sketch on the internet what has the following:

String command = ""

Okay, so command is a String object that is currently empty.

Then there is a function declared as follows:

int readSeralInputCommnad(String * ptr);

This function takes as an input a pointer to a String object.

readSerialInputCommand( ) is called as follows:

serialResult = readSerialInputCommand(&command);

This means that the address of command is being passed in which is what a pointer is.
So far so good. I understand it up to this point.

Inside readSerialInputCommand( ) function is

*ptr = *ptr + Serial.read( );

Serial.read( ) reads a byte, but the *ptr = *ptr + Serial.read( ); totally confuses me.

What is happening there?

The sketch works, but I want to understand it better.

*ptr = *ptr + Serial.read( );

ptr is a pointer to a String instance. *ptr is the thing pointed to - the String instance, So, this is adding the character just read to the String instance that was passed in, via pointer.

A rather poor design, since NULL terminated char arrays are so much more Arduino-compatible.

Great. Thanks!

Maybe I will give a try to re-writing it with traditional C strings.