Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.119
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
Python-3.10.14 /
Objects /
stringlib /
Delete
Unzip
Name
Size
Permission
Date
Action
clinic
[ DIR ]
drwxr-xr-x
2024-03-19 22:46
README.txt
1.16
KB
-rw-r--r--
2024-03-19 22:46
asciilib.h
1.11
KB
-rw-r--r--
2024-03-19 22:46
codecs.h
27.39
KB
-rw-r--r--
2024-03-19 22:46
count.h
666
B
-rw-r--r--
2024-03-19 22:46
ctype.h
3.04
KB
-rw-r--r--
2024-03-19 22:46
eq.h
848
B
-rw-r--r--
2024-03-19 22:46
fastsearch.h
24.3
KB
-rw-r--r--
2024-03-19 22:46
find.h
3.19
KB
-rw-r--r--
2024-03-19 22:46
find_max_char.h
3.64
KB
-rw-r--r--
2024-03-19 22:46
join.h
4.62
KB
-rw-r--r--
2024-03-19 22:46
localeutil.h
2.5
KB
-rw-r--r--
2024-03-19 22:46
partition.h
3.22
KB
-rw-r--r--
2024-03-19 22:46
replace.h
1.81
KB
-rw-r--r--
2024-03-19 22:46
split.h
11.05
KB
-rw-r--r--
2024-03-19 22:46
stringdefs.h
1.13
KB
-rw-r--r--
2024-03-19 22:46
stringlib_find_two_way_notes.txt
16.37
KB
-rw-r--r--
2024-03-19 22:46
transmogrify.h
19.4
KB
-rw-r--r--
2024-03-19 22:46
ucs1lib.h
1.08
KB
-rw-r--r--
2024-03-19 22:46
ucs2lib.h
1.08
KB
-rw-r--r--
2024-03-19 22:46
ucs4lib.h
1.09
KB
-rw-r--r--
2024-03-19 22:46
undef.h
212
B
-rw-r--r--
2024-03-19 22:46
unicode_format.h
40.36
KB
-rw-r--r--
2024-03-19 22:46
unicodedefs.h
1.19
KB
-rw-r--r--
2024-03-19 22:46
Save
Rename
/* stringlib: partition implementation */ #ifndef STRINGLIB_FASTSEARCH_H # error must include "stringlib/fastsearch.h" before including this module #endif #if !STRINGLIB_MUTABLE && !defined(STRINGLIB_GET_EMPTY) # error "STRINGLIB_GET_EMPTY must be defined if STRINGLIB_MUTABLE is zero" #endif Py_LOCAL_INLINE(PyObject*) STRINGLIB(partition)(PyObject* str_obj, const STRINGLIB_CHAR* str, Py_ssize_t str_len, PyObject* sep_obj, const STRINGLIB_CHAR* sep, Py_ssize_t sep_len) { PyObject* out; Py_ssize_t pos; if (sep_len == 0) { PyErr_SetString(PyExc_ValueError, "empty separator"); return NULL; } out = PyTuple_New(3); if (!out) return NULL; pos = FASTSEARCH(str, str_len, sep, sep_len, -1, FAST_SEARCH); if (pos < 0) { #if STRINGLIB_MUTABLE PyTuple_SET_ITEM(out, 0, STRINGLIB_NEW(str, str_len)); PyTuple_SET_ITEM(out, 1, STRINGLIB_NEW(NULL, 0)); PyTuple_SET_ITEM(out, 2, STRINGLIB_NEW(NULL, 0)); if (PyErr_Occurred()) { Py_DECREF(out); return NULL; } #else Py_INCREF(str_obj); PyTuple_SET_ITEM(out, 0, (PyObject*) str_obj); PyObject *empty = (PyObject*)STRINGLIB_GET_EMPTY(); assert(empty != NULL); Py_INCREF(empty); PyTuple_SET_ITEM(out, 1, empty); Py_INCREF(empty); PyTuple_SET_ITEM(out, 2, empty); #endif return out; } PyTuple_SET_ITEM(out, 0, STRINGLIB_NEW(str, pos)); Py_INCREF(sep_obj); PyTuple_SET_ITEM(out, 1, sep_obj); pos += sep_len; PyTuple_SET_ITEM(out, 2, STRINGLIB_NEW(str + pos, str_len - pos)); if (PyErr_Occurred()) { Py_DECREF(out); return NULL; } return out; } Py_LOCAL_INLINE(PyObject*) STRINGLIB(rpartition)(PyObject* str_obj, const STRINGLIB_CHAR* str, Py_ssize_t str_len, PyObject* sep_obj, const STRINGLIB_CHAR* sep, Py_ssize_t sep_len) { PyObject* out; Py_ssize_t pos; if (sep_len == 0) { PyErr_SetString(PyExc_ValueError, "empty separator"); return NULL; } out = PyTuple_New(3); if (!out) return NULL; pos = FASTSEARCH(str, str_len, sep, sep_len, -1, FAST_RSEARCH); if (pos < 0) { #if STRINGLIB_MUTABLE PyTuple_SET_ITEM(out, 0, STRINGLIB_NEW(NULL, 0)); PyTuple_SET_ITEM(out, 1, STRINGLIB_NEW(NULL, 0)); PyTuple_SET_ITEM(out, 2, STRINGLIB_NEW(str, str_len)); if (PyErr_Occurred()) { Py_DECREF(out); return NULL; } #else PyObject *empty = (PyObject*)STRINGLIB_GET_EMPTY(); assert(empty != NULL); Py_INCREF(empty); PyTuple_SET_ITEM(out, 0, empty); Py_INCREF(empty); PyTuple_SET_ITEM(out, 1, empty); Py_INCREF(str_obj); PyTuple_SET_ITEM(out, 2, (PyObject*) str_obj); #endif return out; } PyTuple_SET_ITEM(out, 0, STRINGLIB_NEW(str, pos)); Py_INCREF(sep_obj); PyTuple_SET_ITEM(out, 1, sep_obj); pos += sep_len; PyTuple_SET_ITEM(out, 2, STRINGLIB_NEW(str + pos, str_len - pos)); if (PyErr_Occurred()) { Py_DECREF(out); return NULL; } return out; }