Lines Matching defs:prefix
533 "removeprefix($self, prefix, /)\n"
536 "Return a bytes object with the given prefix string removed if present.\n"
538 "If the bytes starts with the prefix string, return bytes[len(prefix):].\n"
545 bytes_removeprefix_impl(PyBytesObject *self, Py_buffer *prefix);
551 Py_buffer prefix = {NULL, NULL};
553 if (PyObject_GetBuffer(arg, &prefix, PyBUF_SIMPLE) != 0) {
556 if (!PyBuffer_IsContiguous(&prefix, 'C')) {
560 return_value = bytes_removeprefix_impl(self, &prefix);
563 /* Cleanup for prefix */
564 if (prefix.obj) {
565 PyBuffer_Release(&prefix);
578 "return bytes[:-len(prefix)]. Otherwise, return a copy of the original\n"