Oct 3, 2010 05:52 AM
(This post was last modified: Oct 3, 2010 05:54 AM by ubbelol.)
I love browsing through my old projects. I found this little encoding function i made to turn strings into ASCII values.
But please note that when trying to use this function don't use "advanced" chars (characters with an ascii value > 999) as the function can't handle them (it's easily modified though if you need it)
Basically what it does is check if the value is under 100, if it is it formats the value like "9(ascii #)" so it can be read in the decode function. I don't know what this could be used for but maybe for your strings in stubs?
Encode:
http://pastie.org/1196502
Decode:
http://pastie.org/1196504
Example usage:
[IMG]http://i350.photobucket.com/albums/q408/ubbe12/ascii.gif[/IMG]
But please note that when trying to use this function don't use "advanced" chars (characters with an ascii value > 999) as the function can't handle them (it's easily modified though if you need it)
Basically what it does is check if the value is under 100, if it is it formats the value like "9(ascii #)" so it can be read in the decode function. I don't know what this could be used for but maybe for your strings in stubs?
Encode:
http://pastie.org/1196502
Decode:
http://pastie.org/1196504
Example usage:
Code
string str = "abc";
str = encodestr(str); // "str" is now holding "997998999"[IMG]http://i350.photobucket.com/albums/q408/ubbe12/ascii.gif[/IMG]
Probably coding some useless shit.

