rot13 function
A function to rot13 a string
Rate rot13 function
(2(2 Vote))
Function rot13(rot13text)
rot13text_rotated = ""
For i = 1 to Len(rot13text)
j = Mid(rot13text, i, 1)
k = Asc(j)
if k >= 97 and k =< 109 then
k = k + 13 ' a ... m inclusive become n ... z
elseif k >= 110 and k =< 122 then
k = k - 13 ' n ... z inclusive become a ... m
elseif k >= 65 and k =< 77 then
k = k + 13 ' A ... M inclusive become N ... Z
elseif k >= 78 and k =< 90 then
k = k - 13 ' N ... Z inclusive become A ... M
end if
rot13text_rotated = rot13text_rotated & Chr(k)
Next
rot13 = rot13text_rotated
End Function
rot13 function Comments
No comments yet — be the first to post one!
Post a Comment