String.Char

String.char’s, how are they used and what do they do?

I read this, http://wiki.garrysmod.com/?title=String.char
but it didn’t really clarify it.

Good question.

Every character has a corresponding byte value (a number in the range 0-255). string.char converts this number into a character. string.byte does the opposite.

According to the example, you can see the numerical equivalent (in the string library) of each character. For example, ABC = (65, 66, 67). I know left mouse click is 107 and right mouse click is 108. This is used for things like SWEP attack function definitions, and perhaps some encoding/decoding stuff.

Where can I find the corresponding byte value?

What do you mean?

print(string.byte(“a”))

Alternatively:

http://www.papuaweb.org/info/tek/ascii-000-127.gif