" or mid(strArr(0),1,1) = """" Then
tmpWord = mid(strArr(0),1,1) & Ucase(mid(strArr(0),2,1)) & mid(strArr(0),3,len(strArr(0))-2)
Else
tmpWord = Ucase(mid(strArr(0),1,1)) & mid(strArr(0),2,len(strArr(0))-1)
End if
strArr(0) = tmpWord
'Also, make sure the last word In the array is upper case, but don't forget To take into account
'that the String may be in Single or Double quotes.
last = ubound(strArr)
if mid(strArr(last),1,1) = "'" or mid(strArr(last),1,1) = """" Then
tmpWord = mid(strArr(last),1,1) & Ucase(mid(strArr(last),2,1)) & mid(strArr(0),3,len(strArr(last))-2)
Else
tmpWord = Ucase(mid(strArr(last),1,1)) & mid(strArr(last),2,len(strArr(last))-1)
End if
strArr(last) = tmpWord
'Rebuild the whole String from the array parts.
For x = lbound(strArr) To ubound(strArr)
tmpString = tmpString & strArr(x) & " "
Next
PCase = tmpString
End function
%>
tmpWord = mid(strArr(0),1,1) & Ucase(mid(strArr(0),2,1)) & mid(strArr(0),3,len(strArr(0))-2)
Else
tmpWord = Ucase(mid(strArr(0),1,1)) & mid(strArr(0),2,len(strArr(0))-1)
End if
strArr(0) = tmpWord
'Also, make sure the last word In the array is upper case, but don't forget To take into account
'that the String may be in Single or Double quotes.
last = ubound(strArr)
if mid(strArr(last),1,1) = "'" or mid(strArr(last),1,1) = """" Then
tmpWord = mid(strArr(last),1,1) & Ucase(mid(strArr(last),2,1)) & mid(strArr(0),3,len(strArr(last))-2)
Else
tmpWord = Ucase(mid(strArr(last),1,1)) & mid(strArr(last),2,len(strArr(last))-1)
End if
strArr(last) = tmpWord
'Rebuild the whole String from the array parts.
For x = lbound(strArr) To ubound(strArr)
tmpString = tmpString & strArr(x) & " "
Next
PCase = tmpString
End function
%>
| 对此文章发表了评论 |
