SplitScript reference / Migration / Numeric byte order

Numeric byte order

Migration from Rust, C#

Source pattern

  • Rust: swap_bytes

  • Rust: from_be

Canonical SplitScript

  • swap_bytes becomes swapBytes.

  • from_be becomes swapBytes.

Use the canonical language and API symbols linked below.

Semantic difference

Use Numeric.swapBytes to reverse a numeric value's raw bytes after reading data stored in the opposite byte order. It preserves the exact integer or floating-point type; eight-bit values are unchanged.

Supported hosts

This uses the standard SplitScript runtime contract. Any provider-specific requirements are documented by the linked canonical API.