In a western name, you usually have a first name, some number of middle names, and a surname (family name). What is the catch-all word for these components?
To give you context: I am writing a function that takes a name and removes unnecessary whitespace between the components, e.g. John Smith --> John Smith. I'm writing a comment to explain what the function does, but I can't settle on a good word for these components. Surely there is a word for this?
I know that all these components are technically "names", but in this context, writing "removes whitespace between names in a name" seems confusing at best. I've also thought about calling them "words", but again this seems misleading. My current top choice is "components", but this seems overly general.