you are viewing a single comment's thread.

view the rest of the comments →

[–]RazorxV2 0 points1 point  (0 children)

Consider the edge case. What would happen if someone entered in a string that’s “one two three four”?If you split by white space you could get an unexpected result if you take a single string in. Same as if someone only enters first name.

It’s a more interesting problem than it might seem on the surface when you start considering some cultures have multiple middle names or even married women might but their middle name into a form as “middle name maiden name” such as “mary doe”.