Lines Matching refs:self

16 return_self(PyObject *self)
19 if (STRINGLIB_CHECK_EXACT(self)) {
20 Py_INCREF(self);
21 return self;
24 return STRINGLIB_NEW(STRINGLIB_STR(self), STRINGLIB_LEN(self));
38 stringlib_expandtabs_impl(PyObject *self, int tabsize)
48 e = STRINGLIB_STR(self) + STRINGLIB_LEN(self);
49 for (p = STRINGLIB_STR(self); p < e; p++) {
82 for (p = STRINGLIB_STR(self); p < e; p++) {
106 pad(PyObject *self, Py_ssize_t left, Py_ssize_t right, char fill)
116 return return_self(self);
119 u = STRINGLIB_NEW(NULL, left + STRINGLIB_LEN(self) + right);
124 STRINGLIB_STR(self),
125 STRINGLIB_LEN(self));
127 memset(STRINGLIB_STR(u) + left + STRINGLIB_LEN(self),
147 stringlib_ljust_impl(PyObject *self, Py_ssize_t width, char fillchar)
150 if (STRINGLIB_LEN(self) >= width) {
151 return return_self(self);
154 return pad(self, 0, width - STRINGLIB_LEN(self), fillchar);
171 stringlib_rjust_impl(PyObject *self, Py_ssize_t width, char fillchar)
174 if (STRINGLIB_LEN(self) >= width) {
175 return return_self(self);
178 return pad(self, width - STRINGLIB_LEN(self), 0, fillchar);
195 stringlib_center_impl(PyObject *self, Py_ssize_t width, char fillchar)
200 if (STRINGLIB_LEN(self) >= width) {
201 return return_self(self);
204 marg = width - STRINGLIB_LEN(self);
207 return pad(self, left, marg - left, fillchar);
222 stringlib_zfill_impl(PyObject *self, Py_ssize_t width)
229 if (STRINGLIB_LEN(self) >= width) {
230 return return_self(self);
233 fill = width - STRINGLIB_LEN(self);
235 s = pad(self, fill, 0, '0');
277 /* len(self)>=1, from="", len(to)>=1, maxcount>=1 */
279 stringlib_replace_interleave(PyObject *self,
289 self_len = STRINGLIB_LEN(self);
315 self_s = STRINGLIB_STR(self);
348 /* len(self)>=1, len(from)==1, to="", maxcount>=1 */
350 stringlib_replace_delete_single_character(PyObject *self,
359 self_len = STRINGLIB_LEN(self);
360 self_s = STRINGLIB_STR(self);
364 return return_self(self);
391 /* len(self)>=1, len(from)>=2, to="", maxcount>=1 */
394 stringlib_replace_delete_substring(PyObject *self,
404 self_len = STRINGLIB_LEN(self);
405 self_s = STRINGLIB_STR(self);
413 return return_self(self);
444 /* len(self)>=1, len(from)==len(to)==1, maxcount>=1 */
446 stringlib_replace_single_character_in_place(PyObject *self,
456 self_s = STRINGLIB_STR(self);
457 self_len = STRINGLIB_LEN(self);
463 return return_self(self);
491 /* len(self)>=1, len(from)==len(to)>=2, maxcount>=1 */
493 stringlib_replace_substring_in_place(PyObject *self,
505 self_s = STRINGLIB_STR(self);
506 self_len = STRINGLIB_LEN(self);
513 return return_self(self);
543 /* len(self)>=1, len(from)==1, len(to)>=2, maxcount>=1 */
545 stringlib_replace_single_character(PyObject *self,
556 self_s = STRINGLIB_STR(self);
557 self_len = STRINGLIB_LEN(self);
562 return return_self(self);
607 /* len(self)>=1, len(from)>=2, len(to)>=2, maxcount>=1 */
609 stringlib_replace_substring(PyObject *self,
620 self_s = STRINGLIB_STR(self);
621 self_len = STRINGLIB_LEN(self);
629 return return_self(self);
678 stringlib_replace(PyObject *self,
683 if (STRINGLIB_LEN(self) < from_len) {
685 return return_self(self);
691 return return_self(self);
698 return return_self(self);
703 return stringlib_replace_interleave(self, to_s, to_len, maxcount);
710 self, from_s[0], maxcount);
713 self, from_s, from_len, maxcount);
722 self, from_s[0], to_s[0], maxcount);
725 self, from_s, from_len, to_s, to_len, maxcount);
732 self, from_s[0], to_s, to_len, maxcount);
736 self, from_s, from_len, to_s, to_len, maxcount);