- PyString_AS_STRING
const(char)* PyString_AS_STRING(PyObject* op)
Macro, trading safety for speed */
/// Availability: 2.
- PyString_AsDecodedObject
PyObject* PyString_AsDecodedObject(PyObject* str, const(char)* encoding, const(char)* errors)
- PyString_AsEncodedObject
PyObject* PyString_AsEncodedObject(PyObject* str, const(char)* encoding, const(char)* errors)
- PyString_AsString
const(char)* PyString_AsString(PyObject*)
- PyString_AsStringAndSize
int PyString_AsStringAndSize(PyObject* obj, char** s, int* len)
- PyString_CHECK_INTERNED
int PyString_CHECK_INTERNED(PyObject* op)
Use only if you know it's a string */
/// Availability: 2.
- PyString_Check
int PyString_Check(PyObject* op)
- PyString_CheckExact
int PyString_CheckExact(PyObject* op)
- PyString_Concat
void PyString_Concat(PyObject**, PyObject*)
- PyString_ConcatAndDel
void PyString_ConcatAndDel(PyObject**, PyObject*)
- PyString_Decode
PyObject* PyString_Decode(const(char)* s, Py_ssize_t size, const(char)* encoding, const(char)* errors)
- PyString_DecodeEscape
PyObject* PyString_DecodeEscape(const(char)*, Py_ssize_t, const(char)*, Py_ssize_t, const(char)*)
- PyString_Encode
PyObject* PyString_Encode(const(char)* s, Py_ssize_t size, const(char)* encoding, const(char)* errors)
- PyString_Format
PyObject* PyString_Format(PyObject*, PyObject*)
- PyString_FromFormat
PyObject* PyString_FromFormat(const(char)*, ...)
- PyString_FromFormatV
PyObject* PyString_FromFormatV(const(char)*, va_list)
- PyString_FromString
PyObject* PyString_FromString(const(char)*)
For PyString_FromString(), the parameter `str' points to a null-terminated
string containing exactly `size' bytes.
- PyString_FromStringAndSize
PyObject* PyString_FromStringAndSize(const(char)*, Py_ssize_t)
For PyString_FromString(), the parameter `str' points to a null-terminated
string containing exactly `size' bytes.
- PyString_GET_SIZE
Py_ssize_t PyString_GET_SIZE(PyObject* op)
- PyString_InternFromString
PyObject* PyString_InternFromString(const(char)*)
- PyString_InternImmortal
void PyString_InternImmortal(PyObject**)
- PyString_InternInPlace
void PyString_InternInPlace(PyObject**)
- PyString_Repr
PyObject* PyString_Repr(PyObject*, int)
- PyString_Size
Py_ssize_t PyString_Size(PyObject*)
- _PyBytes_FormatAdvanced
PyObject* _PyBytes_FormatAdvanced(PyObject* obj, char* format_spec, Py_ssize_t format_spec_len)
Format the object based on the format_spec, as defined in PEP 3101
(Advanced String Formatting). */
/// Availability: 2.6, 2.
- _PyString_Eq
int _PyString_Eq(PyObject*, PyObject*)
- _PyString_FormatLong
PyObject* _PyString_FormatLong(PyObject*, int, int, int, char**, int*)
- _PyString_InsertThousandsGrouping
int _PyString_InsertThousandsGrouping(char* buffer, Py_ssize_t n_buffer, Py_ssize_t n_digits, Py_ssize_t buf_size, Py_ssize_t* count, int append_zero_char)
Using the current locale, insert the thousands grouping
into the string pointed to by buffer. For the argument descriptions,
see Objects/stringlib/localeutil.h */
/// Availability: 2.6, 2.
- _PyString_Join
PyObject* _PyString_Join(PyObject* sep, PyObject* x)
- _PyString_Resize
int _PyString_Resize(PyObject**, Py_ssize_t)
Mirrors stringobject.h
Type PyStringObject represents a character string. An extra zero byte is reserved at the end to ensure it is zero-terminated, but a size is present so strings with null bytes in them can be represented. This is an immutable object type.
There are functions to create new string objects, to test an object for string-ness, and to get the string value. The latter function returns a null pointer if the object is not of the proper type. There is a variant that takes an explicit size as well as a variant that assumes a zero-terminated string. Note that none of the functions should be applied to nil objects.
Note stringobject goes away in python 3 (well, sort of; it gets moved to bytesobject.h - look there for portability)