Capitalize the first letter of each word in a string
Capitalize the first letter of each word in a string
API Declarations
[email protected]
Rate Capitalize the first letter of each word in a string
(2(2 Vote))
t$ = Text1.Text 'the string
If t$ <> "" Then
Mid$(t$, 1, 1) = UCase$(Mid$(t$, 1, 1))
For i = 1 To Len(t$) - 1
If Mid$(t$, i, 2) = cr$ Then Mid$(t$, i + 2, 1) = UCase$(Mid$(t$, i + 2, 1))
If Mid$(t$, i, 1) = " " Then Mid$(t$, i + 1, 1) = UCase$(Mid$(t$, i + 1, 1))
Next
Text1.Text = t$
End If
Capitalize the first letter of each word in a string Comments
No comments yet — be the first to post one!
Post a Comment