string.byte

From Garry's Mod
Jump to: navigation, search
 string.byte( )

Contents

Description

Returns the given string's characters in their numeric ASCII representation.

Arguments

string string

The string to get the chars from.

Arguments

number startPos=1

The first character of the string to get the byte of.

Arguments

number endPos=startPos

The last character of the string to get the byte of.

Returns

vararg

Numerical bytes

Examples

Example

Prints the first 4 numerical bytes from the string "Hello, World!"

print(string.byte("Hello, World!", 1, 4))

Output:

72

101 108

108
Personal tools
Navigation