book_4_sparkGenerated
code_blocksInput

Description

The Value field in the StringToken struct represents the tokenized form of a string. It is a UInt32 value that is used internally to optimize string operations by converting strings into a more efficient format for comparison and storage.

Usage

Use the Value field to access the tokenized representation of a string when working with the StringToken struct. This field is public and can be accessed directly to retrieve the underlying token value.

Example

// Example of using the StringToken struct and accessing the Value field

// Create a StringToken using the Literal method
StringToken token = StringToken.Literal("example", 12345);

// Access the token's value
uint tokenValue = token.Value;

// Output the token value
// Note: Avoid using Console.WriteLine in s&box, use in-game logging instead
Log.Info($"Token Value: {tokenValue}");