Lines Matching defs:prefix
111 "removeprefix($self, prefix, /)\n"
114 "Return a bytearray with the given prefix string removed if present.\n"
116 "If the bytearray starts with the prefix string, return\n"
117 "bytearray[len(prefix):]. Otherwise, return a copy of the original\n"
124 bytearray_removeprefix_impl(PyByteArrayObject *self, Py_buffer *prefix);
130 Py_buffer prefix = {NULL, NULL};
132 if (PyObject_GetBuffer(arg, &prefix, PyBUF_SIMPLE) != 0) {
135 if (!PyBuffer_IsContiguous(&prefix, 'C')) {
139 return_value = bytearray_removeprefix_impl(self, &prefix);
142 /* Cleanup for prefix */
143 if (prefix.obj) {
144 PyBuffer_Release(&prefix);