16 lines
353 B
Plaintext
16 lines
353 B
Plaintext
function ProperCase(sString)
|
|
Dim lTemp
|
|
Dim sTemp, sTemp2
|
|
Dim x
|
|
sString = LCase(sString)
|
|
if Len(sString) Then
|
|
sTemp = Split(sString, " ")
|
|
lTemp = UBound(sTemp)
|
|
For x = 0 To lTemp
|
|
sTemp2 = sTemp2 & UCase(Left(sTemp(x), 1)) & Mid(sTemp(x), 2) & " "
|
|
Next
|
|
ProperCase = trim(sTemp2)
|
|
Else
|
|
ProperCase = sString
|
|
End if
|
|
End function |