hello everyone,
I looked into the forum for this question of mine but just couldn't find it. so I want to create that in B4A but don't know how.
any help would be appreciated.
Dim UserName As String = "Aeric Poon"
Dim Names() As String = Regex.Split(" ", UserName.Trim)
Dim Initials As String
If Names.Length > 1 Then
'Initials = Names(0).SubString2(0, 1) & Names(Names.Length - 1).SubString2(0, 1)
Initials = Names(0).SubString2(0, 1) & Names(1).SubString2(0, 1)
Else
If Names(0).Length > 0 Then
Initials = Names(0).SubString2(0, 1)
End If
End If
LblFirstLastName.Text = UserName
LblShortName.Text = Initials.ToUpperCase
Dim UserName As String = "Aeric Poon"
Dim Names() As String = Regex.Split(" ", UserName.Trim)
Dim Initials As String
If Names.Length > 1 Then
'Initials = Names(0).SubString2(0, 1) & Names(Names.Length - 1).SubString2(0, 1)
Initials = Names(0).SubString2(0, 1) & Names(1).SubString2(0, 1)
Else
If Names(0).Length > 0 Then
Initials = Names(0).SubString2(0, 1)
End If
End If
LblFirstLastName.Text = UserName
LblShortName.Text = Initials.ToUpperCase