shahab
Well-known member
I have a function in VB Script but I can not covert it to CS!
Help me please:
Function En2Fr (sStr)
Dim nLen, i, ch, sFrStr
nLen = Len(sStr)
if nLen = 0 OR IsNull(nLen) then
En2Fr = sStr
Exit Function
end if
sFrStr = ""
for i = 1 to nLen
ch = Mid(sStr, i, 1)
if 48 <= Asc(ch) AND Asc(ch) <= 57 then
ch = ChrW(Asc(ch) + 1728)
end if
sFrStr = sFrStr + ch
next
En2Fr = sFrStr
End Function
Help me please:
Function En2Fr (sStr)
Dim nLen, i, ch, sFrStr
nLen = Len(sStr)
if nLen = 0 OR IsNull(nLen) then
En2Fr = sStr
Exit Function
end if
sFrStr = ""
for i = 1 to nLen
ch = Mid(sStr, i, 1)
if 48 <= Asc(ch) AND Asc(ch) <= 57 then
ch = ChrW(Asc(ch) + 1728)
end if
sFrStr = sFrStr + ch
next
En2Fr = sFrStr
End Function