picop.cybytearray#
Fast bytearray accessors.
- picop.cybytearray.bytearray_check(p)#
Return True if
pis abytearrayor subtype (PyByteArray_Check). :type p:object:param p:
- picop.cybytearray.bytearray_check_exact(p)#
Return True if
type(p) is bytearray(PyByteArray_CheckExact). :type p:object:param p:
- picop.cybytearray.bytearray_concat(a, b)#
Return a new bytearray concatenating
aandbviaPyByteArray_Concat. :type a:object:param a: :type b:object:param b:- Return type:
- picop.cybytearray.bytearray_contains(haystack, needle)#
Return True if
needleis found in typedhaystack.Notes
Mirrors
bytes_containssearch strategy on a typedbytearray.
- picop.cybytearray.bytearray_eq(a, b)#
Return True if typed
bytearrayvalues are equal.Notes
Identity/len short-circuit plus
memcmp.
- picop.cybytearray.bytearray_from_object(o)#
Return
bytearray(o)viaPyByteArray_FromObject(buffer protocol). :type o:object:param o:- Return type:
- picop.cybytearray.bytearray_len(ba)#
Return
len(ba)viaPyByteArray_GET_SIZE. :type ba:bytearray:param ba:
- picop.cybytearray.bytearray_ne(a, b)#
Return True if typed
bytearrayvalues differ (not bytearray_eq). :type a:bytearray:param a: :type b:bytearray:param b:
- picop.cybytearray.bytearray_resize(ba, n)#
Resize
bain place viaPyByteArray_Resize.Notes
Returns
0on success and-1on error; errors raise. Do not use the status int as a bool.