summaryrefslogtreecommitdiffstats
path: root/contrib/tools/cython/Cython/Includes/libcpp/string.pxd
diff options
context:
space:
mode:
authornik-bes <[email protected]>2025-05-19 07:20:13 +0300
committernik-bes <[email protected]>2025-05-19 07:36:02 +0300
commit317b7368e24941ff76499f500579fd9b10f6656e (patch)
treeabbcbaea595e7d2e9f23cf59a408b3082fe4340d /contrib/tools/cython/Cython/Includes/libcpp/string.pxd
parent6b666a52d40308ab9b3532cd8d3008b9f37cfffb (diff)
Update Cython to 3.0.10.
commit_hash:b43c96b868cd36d636192fd2c6024d9f0d2fb6f8
Diffstat (limited to 'contrib/tools/cython/Cython/Includes/libcpp/string.pxd')
-rw-r--r--contrib/tools/cython/Cython/Includes/libcpp/string.pxd136
1 files changed, 121 insertions, 15 deletions
diff --git a/contrib/tools/cython/Cython/Includes/libcpp/string.pxd b/contrib/tools/cython/Cython/Includes/libcpp/string.pxd
index a894144f1f6..566c748f5f6 100644
--- a/contrib/tools/cython/Cython/Includes/libcpp/string.pxd
+++ b/contrib/tools/cython/Cython/Includes/libcpp/string.pxd
@@ -7,34 +7,116 @@ cdef extern from "<string>" namespace "std::string" nogil:
cdef extern from "<string>" namespace "std" nogil:
cdef cppclass string:
+ ctypedef char value_type
+ # these should really be allocator_type.size_type and
+ # allocator_type.difference_type to be true to the C++ definition
+ # but cython doesn't support deferred access on template arguments
+ ctypedef size_t size_type
+ ctypedef ptrdiff_t difference_type
+
+ cppclass const_iterator
cppclass iterator:
- iterator()
- char& operator*()
- iterator(iterator&)
+ iterator() except +
+ iterator(iterator&) except +
+ value_type& operator*()
iterator operator++()
iterator operator--()
+ iterator operator++(int)
+ iterator operator--(int)
+ iterator operator+(size_type)
+ iterator operator-(size_type)
+ difference_type operator-(iterator)
+ difference_type operator-(const_iterator)
bint operator==(iterator)
+ bint operator==(const_iterator)
bint operator!=(iterator)
-
+ bint operator!=(const_iterator)
+ bint operator<(iterator)
+ bint operator<(const_iterator)
+ bint operator>(iterator)
+ bint operator>(const_iterator)
+ bint operator<=(iterator)
+ bint operator<=(const_iterator)
+ bint operator>=(iterator)
+ bint operator>=(const_iterator)
+ cppclass const_iterator:
+ const_iterator() except +
+ const_iterator(iterator&) except +
+ const_iterator(const_iterator&) except +
+ operator=(iterator&) except +
+ const value_type& operator*()
+ const_iterator operator++()
+ const_iterator operator--()
+ const_iterator operator++(int)
+ const_iterator operator--(int)
+ const_iterator operator+(size_type)
+ const_iterator operator-(size_type)
+ difference_type operator-(iterator)
+ difference_type operator-(const_iterator)
+ bint operator==(iterator)
+ bint operator==(const_iterator)
+ bint operator!=(iterator)
+ bint operator!=(const_iterator)
+ bint operator<(iterator)
+ bint operator<(const_iterator)
+ bint operator>(iterator)
+ bint operator>(const_iterator)
+ bint operator<=(iterator)
+ bint operator<=(const_iterator)
+ bint operator>=(iterator)
+ bint operator>=(const_iterator)
+
+ cppclass const_reverse_iterator
cppclass reverse_iterator:
- char& operator*()
- iterator operator++()
- iterator operator--()
- iterator operator+(size_t)
- iterator operator-(size_t)
+ reverse_iterator() except +
+ reverse_iterator(reverse_iterator&) except +
+ value_type& operator*()
+ reverse_iterator operator++()
+ reverse_iterator operator--()
+ reverse_iterator operator++(int)
+ reverse_iterator operator--(int)
+ reverse_iterator operator+(size_type)
+ reverse_iterator operator-(size_type)
+ difference_type operator-(iterator)
+ difference_type operator-(const_iterator)
bint operator==(reverse_iterator)
+ bint operator==(const_reverse_iterator)
bint operator!=(reverse_iterator)
+ bint operator!=(const_reverse_iterator)
bint operator<(reverse_iterator)
+ bint operator<(const_reverse_iterator)
bint operator>(reverse_iterator)
+ bint operator>(const_reverse_iterator)
bint operator<=(reverse_iterator)
+ bint operator<=(const_reverse_iterator)
bint operator>=(reverse_iterator)
-
- cppclass const_iterator(iterator):
- pass
-
- cppclass const_reverse_iterator(reverse_iterator):
- pass
+ bint operator>=(const_reverse_iterator)
+ cppclass const_reverse_iterator:
+ const_reverse_iterator() except +
+ const_reverse_iterator(reverse_iterator&) except +
+ operator=(reverse_iterator&) except +
+ const value_type& operator*()
+ const_reverse_iterator operator++()
+ const_reverse_iterator operator--()
+ const_reverse_iterator operator++(int)
+ const_reverse_iterator operator--(int)
+ const_reverse_iterator operator+(size_type)
+ const_reverse_iterator operator-(size_type)
+ difference_type operator-(iterator)
+ difference_type operator-(const_iterator)
+ bint operator==(reverse_iterator)
+ bint operator==(const_reverse_iterator)
+ bint operator!=(reverse_iterator)
+ bint operator!=(const_reverse_iterator)
+ bint operator<(reverse_iterator)
+ bint operator<(const_reverse_iterator)
+ bint operator>(reverse_iterator)
+ bint operator>(const_reverse_iterator)
+ bint operator<=(reverse_iterator)
+ bint operator<=(const_reverse_iterator)
+ bint operator>=(reverse_iterator)
+ bint operator>=(const_reverse_iterator)
string() except +
string(const string& s) except +
@@ -47,12 +129,16 @@ cdef extern from "<string>" namespace "std" nogil:
iterator begin()
const_iterator const_begin "begin"()
+ const_iterator cbegin()
iterator end()
const_iterator const_end "end"()
+ const_iterator cend()
reverse_iterator rbegin()
const_reverse_iterator const_rbegin "rbegin"()
+ const_reverse_iterator crbegin()
reverse_iterator rend()
const_reverse_iterator const_rend "rend"()
+ const_reverse_iterator crend()
const char* c_str()
const char* data()
@@ -62,6 +148,7 @@ cdef extern from "<string>" namespace "std" nogil:
void resize(size_t) except +
void resize(size_t, char) except +
void shrink_to_fit() except +
+ void swap(string& other)
size_t capacity()
void reserve(size_t) except +
void clear()
@@ -109,6 +196,16 @@ cdef extern from "<string>" namespace "std" nogil:
void insert(iterator p, size_t n, char c) except +
iterator insert(iterator p, char c) except +
+ string& replace(size_t pos, size_t len, const string& str) except +
+ string& replace(iterator i1, iterator i2, const string& str) except +
+ string& replace(size_t pos, size_t len, const string& str, size_t subpos, size_t sublen) except +
+ string& replace(size_t pos, size_t len, const char* s) except +
+ string& replace(iterator i1, iterator i2, const char* s) except +
+ string& replace(size_t pos, size_t len, const char* s, size_t n) except +
+ string& replace(iterator i1, iterator i2, const char* s, size_t n) except +
+ string& replace(size_t pos, size_t len, size_t n, char c) except +
+ string& replace(iterator i1, iterator i2, size_t n, char c) except +
+
size_t copy(char* s, size_t len, size_t pos) except +
size_t copy(char* s, size_t len) except +
@@ -164,6 +261,15 @@ cdef extern from "<string>" namespace "std" nogil:
string substr(size_t pos) except +
string substr()
+ # C++20
+ bint starts_with(char c) except +
+ bint starts_with(const char* s)
+ bint ends_with(char c) except +
+ bint ends_with(const char* s)
+ # C++23
+ bint contains(char c) except +
+ bint contains(const char* s)
+
#string& operator= (const string&)
#string& operator= (const char*)
#string& operator= (char)