- Home
·
- String Manipulation
·
- Changes a string to correct case (first char upper, rest lower) Better than StrConv as it also capi
Changes a string to correct case (first char upper, rest lower) Better than StrConv as it also capi
Changes a string to correct case (first char upper, rest lower) Better than StrConv as it also capitalises letters after "/" and "-" (and
Rate Changes a string to correct case (first char upper, rest lower) Better than StrConv as it also capi
(2(2 Vote))
Dim intCount
Dim blnNextCharUpper
Dim strCurrentChar
Dim strNewString
for intCount = 1 to len(strOriginalString)
strCurrentChar = mid(strOriginalString, intCount, 1)
if blnNextCharUpper or intCount = 1 then
strNewString = strNewString & Ucase(strCurrentChar)
else
strNewString = strNewString & Lcase(strCurrentChar)
end if
select case strCurrentChar
Case " ", "/", "-"
blnNextCharUpper = True
Case Else
blnNextCharUpper = False
end select
next
ProperCase = strNewString
End Function
Changes a string to correct case (first char upper, rest lower) Better than StrConv as it also capi Comments
No comments yet — be the first to post one!
Post a Comment