str= "KAMESwararao"
For i=1 to len(str)
a=mid(str,i,1)
If ASC(a)>=65 AND ASC(a)<=90 Then
strRes=strRes &a
else
strRes2=strRes2 &a
End If
Next
CapLen=len(strRes)
SmallLen=Len(strRes2)
msgbox "Your Result is- Caps : " &strRes &" - Small : "& strRes2
msgbox "Len of Caps : " & CapLen & "- Len of Small : " & SmallLen
OTherWay:
Dim myarray(),caps,small
mystring = "sAnKeTh"
For i=1 to len(mystring)
ReDim myarray(i)
myarray(i-1) =mid(mystring,i,1)
If myarray(i-1) = Ucase(myarray(i-1)) Then
caps = caps&myarray(i-1)
else
small = small&myarray(i-1)
End If
Next
msgbox caps
msgbox small
For i=1 to len(str)
a=mid(str,i,1)
If ASC(a)>=65 AND ASC(a)<=90 Then
strRes=strRes &a
else
strRes2=strRes2 &a
End If
Next
CapLen=len(strRes)
SmallLen=Len(strRes2)
msgbox "Your Result is- Caps : " &strRes &" - Small : "& strRes2
msgbox "Len of Caps : " & CapLen & "- Len of Small : " & SmallLen
OTherWay:
Dim myarray(),caps,small
mystring = "sAnKeTh"
For i=1 to len(mystring)
ReDim myarray(i)
myarray(i-1) =mid(mystring,i,1)
If myarray(i-1) = Ucase(myarray(i-1)) Then
caps = caps&myarray(i-1)
else
small = small&myarray(i-1)
End If
Next
msgbox caps
msgbox small
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.