annotate Doc/c-api/conversion.rst @ 54294:dba767bc3155 legacy-trunk

remove mention of old ctypes version
author Benjamin Peterson <benjamin@python.org>
date Sat, 23 May 2009 20:59:09 +0000
parents 1d8f24d40c2c
children bab3e3cd76f1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
44797
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
1 .. highlightlang:: c
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
2
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
3 .. _string-conversion:
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
4
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
5 String conversion and formatting
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
6 ================================
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
7
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
8 Functions for number conversion and formatted string output.
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
9
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
10
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
11 .. cfunction:: int PyOS_snprintf(char *str, size_t size, const char *format, ...)
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
12
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
13 Output not more than *size* bytes to *str* according to the format string
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
14 *format* and the extra arguments. See the Unix man page :manpage:`snprintf(2)`.
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
15
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
16
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
17 .. cfunction:: int PyOS_vsnprintf(char *str, size_t size, const char *format, va_list va)
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
18
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
19 Output not more than *size* bytes to *str* according to the format string
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
20 *format* and the variable argument list *va*. Unix man page
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
21 :manpage:`vsnprintf(2)`.
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
22
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
23 :cfunc:`PyOS_snprintf` and :cfunc:`PyOS_vsnprintf` wrap the Standard C library
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
24 functions :cfunc:`snprintf` and :cfunc:`vsnprintf`. Their purpose is to
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
25 guarantee consistent behavior in corner cases, which the Standard C functions do
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
26 not.
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
27
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
28 The wrappers ensure that *str*[*size*-1] is always ``'\0'`` upon return. They
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
29 never write more than *size* bytes (including the trailing ``'\0'`` into str.
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
30 Both functions require that ``str != NULL``, ``size > 0`` and ``format !=
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
31 NULL``.
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
32
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
33 If the platform doesn't have :cfunc:`vsnprintf` and the buffer size needed to
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
34 avoid truncation exceeds *size* by more than 512 bytes, Python aborts with a
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
35 *Py_FatalError*.
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
36
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
37 The return value (*rv*) for these functions should be interpreted as follows:
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
38
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
39 * When ``0 <= rv < size``, the output conversion was successful and *rv*
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
40 characters were written to *str* (excluding the trailing ``'\0'`` byte at
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
41 *str*[*rv*]).
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
42
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
43 * When ``rv >= size``, the output conversion was truncated and a buffer with
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
44 ``rv + 1`` bytes would have been needed to succeed. *str*[*size*-1] is ``'\0'``
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
45 in this case.
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
46
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
47 * When ``rv < 0``, "something bad happened." *str*[*size*-1] is ``'\0'`` in
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
48 this case too, but the rest of *str* is undefined. The exact cause of the error
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
49 depends on the underlying platform.
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
50
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
51 The following functions provide locale-independent string to number conversions.
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
52
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
53
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
54 .. cfunction:: double PyOS_ascii_strtod(const char *nptr, char **endptr)
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
55
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
56 Convert a string to a :ctype:`double`. This function behaves like the Standard C
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
57 function :cfunc:`strtod` does in the C locale. It does this without changing the
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
58 current locale, since that would not be thread-safe.
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
59
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
60 :cfunc:`PyOS_ascii_strtod` should typically be used for reading configuration
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
61 files or other non-user input that should be locale independent.
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
62
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
63 .. versionadded:: 2.4
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
64
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
65 See the Unix man page :manpage:`strtod(2)` for details.
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
66
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
67
53456
1c2d11a7eb23 Mostly formatting nits, and "and-ed together" -> "or-ed together" flags.
Georg Brandl <georg@python.org>
parents: 53442
diff changeset
68 .. cfunction:: char* PyOS_ascii_formatd(char *buffer, size_t buf_len, const char *format, double d)
44797
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
69
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
70 Convert a :ctype:`double` to a string using the ``'.'`` as the decimal
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
71 separator. *format* is a :cfunc:`printf`\ -style format string specifying the
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
72 number format. Allowed conversion characters are ``'e'``, ``'E'``, ``'f'``,
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
73 ``'F'``, ``'g'`` and ``'G'``.
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
74
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
75 The return value is a pointer to *buffer* with the converted string or NULL if
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
76 the conversion failed.
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
77
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
78 .. versionadded:: 2.4
53442
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 50522
diff changeset
79 .. deprecated:: 2.7
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 50522
diff changeset
80 This function is removed in Python 2.7 and 3.1. Use :func:`PyOS_double_to_string`
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 50522
diff changeset
81 instead.
44797
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
82
53456
1c2d11a7eb23 Mostly formatting nits, and "and-ed together" -> "or-ed together" flags.
Georg Brandl <georg@python.org>
parents: 53442
diff changeset
83
1c2d11a7eb23 Mostly formatting nits, and "and-ed together" -> "or-ed together" flags.
Georg Brandl <georg@python.org>
parents: 53442
diff changeset
84 .. cfunction:: char* PyOS_double_to_string(double val, char format_code, int precision, int flags, int *ptype)
53442
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 50522
diff changeset
85
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 50522
diff changeset
86 Convert a :ctype:`double` *val* to a string using supplied
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 50522
diff changeset
87 *format_code*, *precision*, and *flags*.
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 50522
diff changeset
88
53802
1d8f24d40c2c Issue #5920: Changed format.__float__ and complex.__float__ to use a precision of 12 when using the empty presentation type. This more closely matches str()'s behavior and reduces surprises when adding alignment flags to an empty format string. Patch by Mark Dickinson.
Eric Smith <eric@trueblade.com>
parents: 53463
diff changeset
89 *format_code* must be one of ``'e'``, ``'E'``, ``'f'``, ``'F'``,
1d8f24d40c2c Issue #5920: Changed format.__float__ and complex.__float__ to use a precision of 12 when using the empty presentation type. This more closely matches str()'s behavior and reduces surprises when adding alignment flags to an empty format string. Patch by Mark Dickinson.
Eric Smith <eric@trueblade.com>
parents: 53463
diff changeset
90 ``'g'``, ``'G'`` or ``'r'``. For ``'r'``, the supplied *precision*
1d8f24d40c2c Issue #5920: Changed format.__float__ and complex.__float__ to use a precision of 12 when using the empty presentation type. This more closely matches str()'s behavior and reduces surprises when adding alignment flags to an empty format string. Patch by Mark Dickinson.
Eric Smith <eric@trueblade.com>
parents: 53463
diff changeset
91 must be 0 and is ignored. The ``'r'`` format code specifies the
1d8f24d40c2c Issue #5920: Changed format.__float__ and complex.__float__ to use a precision of 12 when using the empty presentation type. This more closely matches str()'s behavior and reduces surprises when adding alignment flags to an empty format string. Patch by Mark Dickinson.
Eric Smith <eric@trueblade.com>
parents: 53463
diff changeset
92 standard :func:`repr` format.
53442
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 50522
diff changeset
93
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 50522
diff changeset
94 *flags* can be zero or more of the values *Py_DTSF_SIGN*,
53456
1c2d11a7eb23 Mostly formatting nits, and "and-ed together" -> "or-ed together" flags.
Georg Brandl <georg@python.org>
parents: 53442
diff changeset
95 *Py_DTSF_ADD_DOT_0*, or *Py_DTSF_ALT*, or-ed together:
53442
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 50522
diff changeset
96
53456
1c2d11a7eb23 Mostly formatting nits, and "and-ed together" -> "or-ed together" flags.
Georg Brandl <georg@python.org>
parents: 53442
diff changeset
97 * *Py_DTSF_SIGN* means to always precede the returned string with a sign
1c2d11a7eb23 Mostly formatting nits, and "and-ed together" -> "or-ed together" flags.
Georg Brandl <georg@python.org>
parents: 53442
diff changeset
98 character, even if *val* is non-negative.
53442
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 50522
diff changeset
99
53456
1c2d11a7eb23 Mostly formatting nits, and "and-ed together" -> "or-ed together" flags.
Georg Brandl <georg@python.org>
parents: 53442
diff changeset
100 * *Py_DTSF_ADD_DOT_0* means to ensure that the returned string will not look
1c2d11a7eb23 Mostly formatting nits, and "and-ed together" -> "or-ed together" flags.
Georg Brandl <georg@python.org>
parents: 53442
diff changeset
101 like an integer.
53442
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 50522
diff changeset
102
53456
1c2d11a7eb23 Mostly formatting nits, and "and-ed together" -> "or-ed together" flags.
Georg Brandl <georg@python.org>
parents: 53442
diff changeset
103 * *Py_DTSF_ALT* means to apply "alternate" formatting rules. See the
1c2d11a7eb23 Mostly formatting nits, and "and-ed together" -> "or-ed together" flags.
Georg Brandl <georg@python.org>
parents: 53442
diff changeset
104 documentation for the :cfunc:`PyOS_snprintf` ``'#'`` specifier for
1c2d11a7eb23 Mostly formatting nits, and "and-ed together" -> "or-ed together" flags.
Georg Brandl <georg@python.org>
parents: 53442
diff changeset
105 details.
53442
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 50522
diff changeset
106
53456
1c2d11a7eb23 Mostly formatting nits, and "and-ed together" -> "or-ed together" flags.
Georg Brandl <georg@python.org>
parents: 53442
diff changeset
107 If *ptype* is non-NULL, then the value it points to will be set to one of
1c2d11a7eb23 Mostly formatting nits, and "and-ed together" -> "or-ed together" flags.
Georg Brandl <georg@python.org>
parents: 53442
diff changeset
108 *Py_DTST_FINITE*, *Py_DTST_INFINITE*, or *Py_DTST_NAN*, signifying that
1c2d11a7eb23 Mostly formatting nits, and "and-ed together" -> "or-ed together" flags.
Georg Brandl <georg@python.org>
parents: 53442
diff changeset
109 *val* is a finite number, an infinite number, or not a number, respectively.
53442
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 50522
diff changeset
110
53456
1c2d11a7eb23 Mostly formatting nits, and "and-ed together" -> "or-ed together" flags.
Georg Brandl <georg@python.org>
parents: 53442
diff changeset
111 The return value is a pointer to *buffer* with the converted string or
53463
a15c28bfbb38 Note that the caller is resposible for freeing the result of PyOS_double_to_string.
Eric Smith <eric@trueblade.com>
parents: 53456
diff changeset
112 *NULL* if the conversion failed. The caller is responsible for freeing the
a15c28bfbb38 Note that the caller is resposible for freeing the result of PyOS_double_to_string.
Eric Smith <eric@trueblade.com>
parents: 53456
diff changeset
113 returned string by calling :cfunc:`PyMem_Free`.
53442
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 50522
diff changeset
114
6947bc3dd433 Issue #5835, deprecate PyOS_ascii_formatd.
Eric Smith <eric@trueblade.com>
parents: 50522
diff changeset
115 .. versionadded:: 2.7
50522
ee9ced92843a Merged revisions 68133-68134,68141-68142,68145-68146,68148-68149,68159-68162,68166,68171-68174,68179,68195-68196,68210,68214-68215,68217-68222 via svnmerge from
Georg Brandl <georg@python.org>
parents: 47937
diff changeset
116
53456
1c2d11a7eb23 Mostly formatting nits, and "and-ed together" -> "or-ed together" flags.
Georg Brandl <georg@python.org>
parents: 53442
diff changeset
117
44797
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
118 .. cfunction:: double PyOS_ascii_atof(const char *nptr)
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
119
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
120 Convert a string to a :ctype:`double` in a locale-independent way.
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
121
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
122 .. versionadded:: 2.4
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
123
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
124 See the Unix man page :manpage:`atof(2)` for details.
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
125
50522
ee9ced92843a Merged revisions 68133-68134,68141-68142,68145-68146,68148-68149,68159-68162,68166,68171-68174,68179,68195-68196,68210,68214-68215,68217-68222 via svnmerge from
Georg Brandl <georg@python.org>
parents: 47937
diff changeset
126
53456
1c2d11a7eb23 Mostly formatting nits, and "and-ed together" -> "or-ed together" flags.
Georg Brandl <georg@python.org>
parents: 53442
diff changeset
127 .. cfunction:: char* PyOS_stricmp(char *s1, char *s2)
44797
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
128
47937
38d3a50defec fix various doc typos #3320
Benjamin Peterson <benjamin@python.org>
parents: 44797
diff changeset
129 Case insensitive comparison of strings. The function works almost
38d3a50defec fix various doc typos #3320
Benjamin Peterson <benjamin@python.org>
parents: 44797
diff changeset
130 identically to :cfunc:`strcmp` except that it ignores the case.
44797
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
131
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
132 .. versionadded:: 2.6
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
133
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
134
53456
1c2d11a7eb23 Mostly formatting nits, and "and-ed together" -> "or-ed together" flags.
Georg Brandl <georg@python.org>
parents: 53442
diff changeset
135 .. cfunction:: char* PyOS_strnicmp(char *s1, char *s2, Py_ssize_t size)
44797
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
136
47937
38d3a50defec fix various doc typos #3320
Benjamin Peterson <benjamin@python.org>
parents: 44797
diff changeset
137 Case insensitive comparison of strings. The function works almost
38d3a50defec fix various doc typos #3320
Benjamin Peterson <benjamin@python.org>
parents: 44797
diff changeset
138 identically to :cfunc:`strncmp` except that it ignores the case.
44797
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
139
ec02dbe6b051 Missed one big file to split up.
Georg Brandl <georg@python.org>
parents:
diff changeset
140 .. versionadded:: 2.6