You can do this multiple ways. I’m sure somebody else have an better way to do this.
Way I did it:
- I split the your name string to array using space delimiter.
vName = “pedro r mandacru”
vFirstLetter = Split(vName.ToString," ")
- Assign each letter to its own variable.
vFirstName = vFirstLetter(0)
vMiddleName = vFirstLetter(1)
vLastName = vFirstLetter(2)
- Get the first character from Middle Name.
vFirstCharOfString = StringInfo.GetNextTextElement(vMiddleName, 0)
- Then I combine the string to get your username.
vUserName = vFirstName + “.” + vFirstCharofString +"." + vLastName