String manipulation
Displaying 1-2 of 2 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Devon

I'm working on a replacement font system for my project, because, well, V2's font system is sorta lame. What I'm trying to figure out right now is how to read the ASCII values out of a string. Is the variable type string just a pointer, or is it something else? In other words can I do:

myvalue = byte[mystring];

and myvalue will be equal to the ASCII code of the first character?

If not, is there any way to read the string data byte by byte?


Thanks,
Devon



--- Square's making money. We're making art.

Posted on 2000-12-19 19:37:18

andy

Put shortly:

string s;
int i;
s="A";
i=asc(s);

i now holds the ASCII value for the first character in s, which is 65 in this case. ('A')

s=chr(i);

s is now equal to the ASCII value of i. ('A' again)



'Never confuse a single defeat with a final defeat.' -F. Scott Fitzgerald

Posted on 2000-12-20 15:22:15


Displaying 1-2 of 2 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.