StrToHex
#1

I've tried to search for it bug failed, I only found 2 threads that where telling to original poster to search for the keyword "StrToHex"

Anyone here got the function, if yes, pleased to share?

Thanks...
Reply
#2

pawn Код:
Description:
StrToHex function allow you to easily convert a string to its hex value.
Syntax:
hexstring = StrToHex(String)
Example:
<%
Response.Write StrToHex("Nice code")
'--- returns: 4E69636520636F6465
%>
ASP Source Code:
<%
Function StrToHex(ByRef Str)
    Dim Length
    Dim Max
    Dim strHex
    Max = Len(Str)
    For Length = 1 To Max
        strHex = strHex & Right("0" & Hex(Asc(Mid(Str, Length, 1))), 2)
    Next
    StrToHex = strHex
End function
%>
Your talking about this?
Reply
#3

"StrToHex" what is it ? Variable/FS/... ?
Reply
#4

Quote:
Originally Posted by Naruto_Emilio
Посмотреть сообщение
pawn Код:
Description:
StrToHex function allow you to easily convert a string to its hex value.
Syntax:
hexstring = StrToHex(String)
Example:
<%
Response.Write StrToHex("Nice code")
'--- returns: 4E69636520636F6465
%>
ASP Source Code:
<%
Function StrToHex(ByRef Str)
    Dim Length
    Dim Max
    Dim strHex
    Max = Len(Str)
    For Length = 1 To Max
        strHex = strHex & Right("0" & Hex(Asc(Mid(Str, Length, 1))), 2)
    Next
    StrToHex = strHex
End function
%>
Your talking about this?
Mostly for colors actually.. I found that on ****** too but have absolute no idea how to convert it to pawn.

But nevermind, got another way. Sorry for creating a uselesss topic.
(I needed it for 0Sprites Editor which will be released tomorrow)
Reply
#5

Quote:
Originally Posted by Zh3r0
Посмотреть сообщение
Mostly for colors actually.. I found that on ****** too but have absolute no idea how to convert it to pawn.

But nevermind, got another way. Sorry for creating a uselesss topic.
(I needed it for 0Sprites Editor which will be released tomorrow)
Alright, good luck .
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)