Extracts the first and last initial from a user's name.
Replicates logic from UUI avatar component to ensure consistency.
Parameters
name: string
The user's full name
Returns string
The initials in uppercase
Note
This function duplicates similar logic from the UUI avatar component.
It filters out parts beginning with special characters or punctuation to handle
cases like "John Doe (Admin)" correctly, resulting in "JD" instead of "J(".
Extracts the first and last initial from a user's name. Replicates logic from UUI avatar component to ensure consistency.