Garry's Mod Wiki

string.byte

vararg string.byte( string string, number startPos = 1, number endPos = startPos )

Description

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

Arguments

1 string string
The string to get the chars from.
2 number startPos = 1
The first character of the string to get the byte of.
3 number endPos = startPos
The last character of the string to get the byte of.

Returns

1 vararg
Numerical bytes

Example

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

print(string.byte("Hello, World!", 1, 4))
Output: 72 101 108 108

Page Links


Special Pages


Wikis

?

Render Time: 51ms

DB GetPage 6
Generate Html 5
SaveChanges (1) 18
Render Body 0
Render Sidebar 18