Skip to content

C8 (Character)

The C8 type represents a single character in raypy. It can hold exactly one character.

  • Supports both string and integer initialization
  • Integer values are interpreted as character codes (ASCII/Unicode)
  • For storing strings with multiple characters, use the String container type instead
  • Useful for representing single character tokens, separators, or codes

Type Information

Type Rayforce Object Type Code Size
C8 -12 8 bits

Creating C8 Values

from raypy import types as t

>>> t.C8("A")
C8("A")

>>> t.C8("1")
C8("1")

>>> t.C8(" ")
C8(" ")

Accessing Values

>>> c = t.C8("X")

>>> c
C8("X")

>>> c.value
"X"

Comparison

>>> t.C8("X") == t.C8("X")
True

>>> t.C8("X") == t.C8("Y")
False