I remember during my lurker days that there was a certain command / code for identifying the starting letters of variables, and I was wondering if that could help with writing a code that automatically arranges variables in order.
Basically, what I want to happen is the player inputs a surname, then they get arranged with other NPCs alphabetically. Is there a way to do this simply or is this a little bit too complex? I’m also thinking of running into a couple of problems like, what if the player has the same surname as an NPC, or if they have the same starting letter then how will that complicate things further?