P Penfound Active Member Licensed User Longtime User Jan 23, 2016 #1 Good morning everyone. I should know this one because I have used it in the past but now I can't find where I used it. What is the function that capitalises the first letter of a word as in john becomes John etc., similar to vbProper Thanks for looking Penfound
Good morning everyone. I should know this one because I have used it in the past but now I can't find where I used it. What is the function that capitalises the first letter of a word as in john becomes John etc., similar to vbProper Thanks for looking Penfound
eurojam Well-Known Member Licensed User Longtime User Jan 23, 2016 #2 I use this one, may be there more efficient ways to do it... B4X: Sub Capitalize(t As String) As String Dim s,r As String s = t.SubString2(0,1) r = t.SubString2(1, t.Length) Return s.ToUpperCase & r End Sub Upvote 0
I use this one, may be there more efficient ways to do it... B4X: Sub Capitalize(t As String) As String Dim s,r As String s = t.SubString2(0,1) r = t.SubString2(1, t.Length) Return s.ToUpperCase & r End Sub
stevel05 Expert Licensed User Longtime User Jan 23, 2016 #3 You could try this https://www.b4x.com/android/forum/threads/proper-case-for-names.41189/ Upvote 1
P Penfound Active Member Licensed User Longtime User Jan 24, 2016 #4 Thanks guys - both solutions work but I chose to go with the steve05 one. Upvote 0