IdString32 - stingray.IdString32 object reference - Stingray Lua API Reference

stingray.IdString32 object reference

Description

A hashed string value.

NOTE: IdString32 objects are temporary. You can only use them in the frame in which they were generated. If you need to save a IdString32 across multiple frames, use a IdString32Box instead. For more information, see Object Lifetimes and Userdata Binding.

You can convert a string to an IdString32, but there is no way of converting the IdString32 back to a string. An IdString32 is a hashed value that can only be compared for equality.

Functions

Parameters

a :

stingray.IdString32

The first IdString32.

b :

stingray.IdString32

The second IdString32.

Returns

boolean

true the two IdString32 values are equal.

Note that you cannot compare the two values with ==, because == between two lightuserdata objects in lua only tests reference equality, not value equality.

Parameters

s :

string

The hexadecimal string value to convert to an IdString32.

Returns

stingray.IdString32

An IdString32 representing the hexadecimal string value.

Parameters

id :

stingray.IdString32

The id to convert to a hexadecimal string value.

Returns

string

A hexadecimal string representation of the IdString32.

Parameters

id :

stingray.IdString32

The IdString32 to return as a string.

Returns

string

The string representation.

Note that this string representation is not the original string that was hashed (the pre-image). The pre-image of the hash cannot be obtained.