iLogic - convert a username john.doe to John.Doe

iLogic - convert a username john.doe to John.Doe

neil.cooke
Participant Participant
427 Views
2 Replies
Message 1 of 3

iLogic - convert a username john.doe to John.Doe

neil.cooke
Participant
Participant

Please could someone help - I have a Custom iProperty with a username already being populated john.doe - I would like to be able to convert it to John.Doe with the caps at the beginning of each name. Is this possible?

Thanks

0 Likes
Accepted solutions (1)
428 Views
2 Replies
Replies (2)
Message 2 of 3

Ralf_Krieg
Advisor
Advisor
Accepted solution

Hello

 

Dim sName As String = "john.doe"
Dim aNameparts() As String = Split(sName, ".")
Dim sNewName As String

For Each aNamepart As String In aNameparts
	If sNewname = "" Then
		sNewName = aNamepart(0).ToString.ToUpper & aNamepart.Substring(1)
	Else
		sNewName = sNewName & "." & aNamepart(0).ToString.ToUpper & aNamepart.Substring(1)
	End If
Next

MsgBox (sNewName)

 


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes
Message 3 of 3

neil.cooke
Participant
Participant

Many thanks, sorry for the late reply.

0 Likes