I doesn't matter we have spaces at the end of the code.  because the getname function will trim such spaces.

But for your second concern, I need to check the document again.