pikapython/examples/BuiltIn/encode_decode.py
pikastech 8f9950d4ae support decode() and encode()
for PikaStdData.String() and PikaStdData.ByteArray()

use example/BuiltIn/encode_decode.py

fix CI
2022-07-14 12:02:38 +08:00

10 lines
187 B
Python

from PikaStdData import String as string
from PikaStdData import ByteArray as bytearray
b = bytearray(b'test')
b_s = b.decode()
print(b_s)
s = string('test')
s_b = s.encode()
print(s_b)