Eyeon:Script/Reference/Libraries/string/byte

From VFXPedia

Jump to: navigation, search

Contents

String : string.byte

Arguments

string.byte( s, i )

  • s (required, string)

a string to be converted to its byte value

  • i (required, number)

an index to the character in 's' which is to be converted

Returns

A string containing the numeric ascii byte value of the character represented by 'i'

Remarks

The string.byte() function gets a string with 0 or more characters, and converts the character at position 'i' to its ascii equivalent. If the argument 'i' is not provided then the first character in the string is used.

Requirements

  • eyeonScript 5.0
  • Fusion 5.0

Examples

-- prints the ascii code for the letter "H" (72) i = string.byte( "H" )

print( i )

-- prints the ascii code for the third

-- letter (l) of "Hello" (108) i = string.byte( "Hello", 3 ) print( i )


Tips for byte (edit)

EyeonTips:Script/Reference/Libraries/string/byte