math.BinToInt

From Garry's Mod
Jump to: navigation, search
 math.BinToInt( )

Contents

Description

Converts a binary string into a number.

Arguments

string string

Binary string to convert

Returns

number

Base 10 number.

Examples

Example

Will print the string "101010101" as a number in console.

print( math.BinToInt( "101010101" ) )

Output:

341
Personal tools
Navigation