algopy_testing.primitives.string
Module Contents
Section titled “Module Contents”Classes
Section titled “Classes”String | Represents a UTF-8 encoded string backed by Bytes, accessible via .bytes. |
|---|
class String
Section titled “class String”Bases: algopy_testing.protocols.BytesBacked
Represents a UTF-8 encoded string backed by Bytes, accessible via .bytes.
Works with str literals instead of bytes literals. Due to lack of AVM support for unicode, indexing and length operations are not supported. Use .bytes.length for byte length.
startswith(prefix: String | str) → bool
Section titled “startswith(prefix: String | str) → bool”endswith(suffix: String | str) → bool
Section titled “endswith(suffix: String | str) → bool”join(others: tuple[String, Ellipsis]) → String
Section titled “join(others: tuple[String, Ellipsis]) → String”classmethod from_bytes(value: Bytes | bytes) → String
Section titled “classmethod from_bytes(value: Bytes | bytes) → String”Construct an instance from the underlying bytes (no validation)
property bytes : Bytes
Section titled “property bytes : Bytes”Get the underlying Bytes.