String

class pyrogue.String(bitSize)[source]

Model class for strings.

Parameters:
  • bitSize (int) – Number of bits being represented.

  • args (Any)

  • kwargs (Any)

Return type:

Any

pytype

alias of str

toBytes(value)[source]

Convert a python string value to a byte array.

Parameters:

value (str) – Python string value to convert.

Returns:

Byte array representation of the value.

Return type:

bytearray

fromBytes(ba)[source]

Convert a byte array to a python string value.

Parameters:

ba (bytearray) – Byte array to extract value from.

Returns:

Python value.

Return type:

str

fromString(string)[source]

Convert a string to a python string value.

Parameters:

string (str) – String representation of the value.

Returns:

Python string value.

Return type:

str