Detect Last Letter of Player's Name/or any string
#1

Basically, how do I reach and store last letter of a string?

For example, your name is John_Smith, how do I make the script detect "H" at the very end and store it?


I found and tried

new len = strlen(string);
printf("%c", string[len - 1]);

but it didn't seem to work.
Reply


Messages In This Thread
Detect Last Letter of Player's Name/or any string - by Garavel - 11.01.2015, 16:43
Re: Detect Last Letter of Player's Name/or any string - by rickisme - 11.01.2015, 17:01
Re: Detect Last Letter of Player's Name/or any string - by Garavel - 11.01.2015, 18:03

Forum Jump:


Users browsing this thread: 1 Guest(s)