But I don't know how to work around strlen()
I don't understand why you think you need to. That example won't work, for several reasons.
First, Serial.read() returns ONE character, not a string.
Second, there is no variable defined called $tmpName, which is not a valid name in C++.
Third, you can't assign an array (if that is what the undefined tmpName is supposed to be) to another array that way.