Skip to content

Commit ade4de4

Browse files
Petr's review
1 parent 750fcf1 commit ade4de4

File tree

2 files changed

+22
-24
lines changed

2 files changed

+22
-24
lines changed

Doc/c-api/conversion.rst

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,33 @@ The following functions provide locale-independent string to number conversions.
165165
.. c:function:: int PyOS_stricmp(const char *s1, const char *s2)
166166
167167
Case insensitive comparison of strings. The function works almost
168-
identically to :c:func:`!strcmp` except that it ignores the case.
168+
identically to :c:func:`!strcmp` except that it ignores the case and locale.
169+
170+
Return ``0`` if the strings are equal, a negative value if *str1* is less
171+
than *str2*, or a positive value if *str1* is greater than *str2*.
172+
173+
This function cannot fail.
169174
170175
171176
.. c:function:: int PyOS_strnicmp(const char *s1, const char *s2, Py_ssize_t size)
172177
173178
Case insensitive comparison of strings. The function works almost
174-
identically to :c:func:`!strncmp` except that it ignores the case.
179+
identically to :c:func:`!strncmp` except that it ignores the case and locale.
180+
181+
Return ``0`` if the strings are equal, a negative value if *str1* is less
182+
than *str2*, or a positive value if *str1* is greater than *str2*.
183+
184+
This function cannot fail.
185+
186+
187+
.. c:function:: int PyOS_mystricmp(const char *str1, const char *str2)
188+
189+
This is an alias of :c:func:`PyOS_stricmp` on all platforms except Windows.
190+
191+
192+
.. c:function:: int PyOS_mystrnicmp(const char *str1, const char *str2, Py_ssize_t size)
193+
194+
This is an alias of :c:func:`PyOS_mystricmp` on all platforms except Windows.
175195
176196
177197
Character classification and conversion

Doc/c-api/sys.rst

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -267,28 +267,6 @@ Operating System Utilities
267267
.. versionadded:: 3.14
268268
269269
270-
.. c:function:: int PyOS_mystricmp(const char *str1, const char *str2)
271-
272-
Compare two strings, *str1* and *str2*. The function works almost
273-
identically to :c:func:`!strcmp` except that it ignores the case.
274-
275-
Return ``0`` if the strings are equal, a negative value if *str1* is less
276-
than *str2*, or a positive value if *str1* is greater than *str2*.
277-
278-
This function cannot fail.
279-
280-
281-
.. c:function:: int PyOS_mystrnicmp(const char *str1, const char *str2, Py_ssize_t size)
282-
283-
Compare two strings, *str1* and *str2*. The function works almost
284-
identically to :c:func:`!strncmp` except that it ignores the case.
285-
286-
Return ``0`` if the strings are equal, a negative value if *str1* is less
287-
than *str2*, or a positive value if *str1* is greater than *str2*.
288-
289-
This function cannot fail.
290-
291-
292270
.. _systemfunctions:
293271
294272
System Functions

0 commit comments

Comments
 (0)