• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

Visual Basic [Alternativa] LCase$

Status
Not open for further replies.

top10

Moderator
User
Joined
Mar 18, 2015
Messages
487
Reputation
0
Reaction score
5,047
Points
243
Credits
0
‎10 Years of Service‎
70%
[HIDE-THANKS][LENGUAJE=VB]Public Function AltLCase(ByVal sString As String) As String

Dim bArr() As Byte

Dim ubArr As Long

Dim lDif As Long

Dim i As Long

bArr = sString ' Convert unicode string to unicode array

ubArr = UBound(bArr) ' Highest possible number in array

For i = 0 To ubArr Step 2

If bArr(i) > 64 And bArr(i) < 91 Then ' If unicode character is a lowercase letter

lDif = bArr(i) - 65 ' Get placement of letter in alphabet

bArr(i) = lDif + 97 ' Use only uppercase letters for replacing

End If

Next i

AltLCase = bArr ' Convert unicode array to unicode string

End Function

[/LENGUAJE][/HIDE-THANKS]

 
Status
Not open for further replies.
Back
Top