tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
M\¬Qc@sMdZddlmZedddƒ[dZdZdZeeZd    Zed
d Zd Z    d Z
x$e dƒD]Z e
e e ƒZ
qrW[ eZeZeZeZd„Zd„Zd„Zd„Zd„Zd„Zd.dd„ZeZdd„ZeZeZd„Z d„Z!d„Z"d„Z#d„Z$e%Z&e'Z(e)Z*e+d ƒZ,d„Z-d„Z.d „Z/d!„Z0d"„Z1d#„Z2d$„Z3d%d&„Z4d d'„Z5d(„Z6d.d)„Z7d.a8d*„Z9dd+„Z:y d jWne;k
rdd,l<TnXy0dd-l=m9Z9mZmZmZeeZWne>k
rHnXd.S(/s8Common string manipulations.
 
Public module variables:
 
whitespace -- a string containing all characters considered whitespace
lowercase -- a string containing all characters considered lowercase letters
uppercase -- a string containing all characters considered uppercase letters
letters -- a string containing all characters considered letters
digits -- a string containing all characters considered decimal digits
hexdigits -- a string containing all characters considered hexadecimal digits
octdigits -- a string containing all characters considered octal digits
 
iÿÿÿÿ(twarnpy3ks3the stringold module has been removed in Python 3.0t
stacklevelis     
tabcdefghijklmnopqrstuvwxyztABCDEFGHIJKLMNOPQRSTUVWXYZt
0123456789tabcdeftABCDEFt01234567ticCs
|jƒS(sSlower(s) -> string
 
    Return a copy of the string s converted to lowercase.
 
    (tlower(ts((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pyR    .scCs
|jƒS(sSupper(s) -> string
 
    Return a copy of the string s converted to uppercase.
 
    (tupper(R
((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pyR 7scCs
|jƒS(s„swapcase(s) -> string
 
    Return a copy of the string s with upper case characters
    converted to lowercase and vice versa.
 
    (tswapcase(R
((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pyR @scCs
|jƒS(smstrip(s) -> string
 
    Return a copy of the string s with leading and trailing
    whitespace removed.
 
    (tstrip(R
((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pyR JscCs
|jƒS(s]lstrip(s) -> string
 
    Return a copy of the string s with leading whitespace removed.
 
    (tlstrip(R
((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pyRTscCs
|jƒS(sbrstrip(s) -> string
 
    Return a copy of the string s with trailing whitespace
    removed.
 
    (trstrip(R
((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pyR]sicCs|j||ƒS(sVsplit(str [,sep [,maxsplit]]) -> list of strings
 
    Return a list of the words in the string s, using sep as the
    delimiter string.  If maxsplit is nonzero, splits into at most
    maxsplit words If sep is not specified, any whitespace string
    is a separator.  Maxsplit defaults to 0.
 
    (split and splitfields are synonymous)
 
    (tsplit(R
tseptmaxsplit((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pyRhs t cCs |j|ƒS(sÖjoin(list [,sep]) -> string
 
    Return a string composed of the words in list, with
    intervening occurrences of sep.  The default separator is a
    single space.
 
    (joinfields and join are synonymous)
 
    (tjoin(twordsR((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pyRws
cGst|j|ƒS(spindex(s, sub [,start [,end]]) -> int
 
    Like find but raises ValueError when the substring is not found.
 
    (t_applytindex(R
targs((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pyRˆscGst|j|ƒS(srrindex(s, sub [,start [,end]]) -> int
 
    Like rfind but raises ValueError when the substring is not found.
 
    (Rtrindex(R
R((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pyR‘scGst|j|ƒS(sÈcount(s, sub[, start[,end]]) -> int
 
    Return the number of occurrences of substring sub in string
    s[start:end].  Optional arguments start and end are
    interpreted as in slice notation.
 
    (Rtcount(R
R((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pyRšscGst|j|ƒS(sfind(s, sub [,start [,end]]) -> in
 
    Return the lowest index in s where substring sub is found,
    such that sub is contained within s[start,end].  Optional
    arguments start and end are interpreted as in slice notation.
 
    Return -1 on failure.
 
    (Rtfind(R
R((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pyR¥s
cGst|j|ƒS(srfind(s, sub [,start [,end]]) -> int
 
    Return the highest index in s where substring sub is found,
    such that sub is contained within s[start,end].  Optional
    arguments start and end are interpreted as in slice notation.
 
    Return -1 on failure.
 
    (Rtrfind(R
R((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pyR²s
cCs9t|ƒtkrt|ƒStdt|ƒjƒ‚dS(sYatof(s) -> float
 
    Return the floating point number represented by the string s.
 
    s%argument 1: expected string, %s foundN(ttypet _StringTypet_floatt    TypeErrort__name__(R
((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pytatofÅs
cGsty|d}Wn'tk
r7tdt|ƒƒ‚nXt|ƒtkrWtt|ƒStdt|ƒjƒ‚dS(ssatoi(s [,base]) -> int
 
    Return the integer represented by the string s in the given
    base, which defaults to 10.  The string s must consist of one
    or more digits, possibly preceded by a sign.  If base is 0, it
    is chosen from the leading characters of s, 0 for octal, 0x or
    0X for hexadecimal.  If base is 16, a preceding 0x or 0X is
    accepted.
 
    is/function requires at least 1 argument: %d givens%argument 1: expected string, %s foundN(t
IndexErrorR tlenRRRt_intR!(RR
((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pytatoiÒs   cGsty|d}Wn'tk
r7tdt|ƒƒ‚nXt|ƒtkrWtt|ƒStdt|ƒjƒ‚dS(s³atol(s [,base]) -> long
 
    Return the long integer represented by the string s in the
    given base, which defaults to 10.  The string s must consist
    of one or more digits, possibly preceded by a sign.  If base
    is 0, it is chosen from the leading characters of s, 0 for
    octal, 0x or 0X for hexadecimal.  If base is 16, a preceding
    0x or 0X is accepted.  A trailing L or l is not accepted,
    unless base is 0.
 
    is/function requires at least 1 argument: %d givens%argument 1: expected string, %s foundN(R#R R$RRRt_longR!(RR
((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pytatolís   cCs,|t|ƒ}|dkr |S|d|S(s³ljust(s, width) -> string
 
    Return a left-justified version of s, in a field of the
    specified width, padded with spaces as needed.  The string is
    never truncated.
 
    iR(R$(R
twidthtn((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pytljust    s cCs,|t|ƒ}|dkr |Sd||S(s´rjust(s, width) -> string
 
    Return a right-justified version of s, in a field of the
    specified width, padded with spaces as needed.  The string is
    never truncated.
 
    iR(R$(R
R)R*((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pytrjusts cCsc|t|ƒ}|dkr |S|d}|drK|drK|d}nd||d||S(s¬center(s, width) -> string
 
    Return a center version of s, in a field of the specified
    width. padded with spaces as needed.  The string is never
    truncated.
 
    iiiR(R$(R
R)R*thalf((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pytcenter#s 
 cCs‹t|ƒtdƒkr!|}n t|ƒ}t|ƒ}||krI|Sd}|ddkrw|d|d}}n|d|||S(s¡zfill(x, width) -> string
 
    Pad a numeric string x with zeros on the left, to fill a field
    of the specified width.  The string x is never truncated.
 
    Rit-t+it0(R/R0(RtreprR$(txR)R
R*tsign((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pytzfill6s       icCssd}}x^|D]V}|dkr>d|t|ƒ|}n||}|dkr||}d}qqW||S(s×expandtabs(s [,tabsize]) -> string
 
    Return a copy of the string s with all tab characters replaced
    by the appropriate number of spaces, depending on the current
    column, and the tabsize (default 8).
 
    Rs    Rs
(R$(R
ttabsizetrestlinetc((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pyt
expandtabsHs
 
 
 cCs|j||ƒS(s+translate(s,table [,deletechars]) -> string
 
    Return a copy of the string s, where all characters occurring
    in the optional argument deletechars are removed, and the
    remaining characters have been mapped through the given
    translation table, which must be a string of length 256.
 
    (t    translate(R
ttablet    deletions((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pyR;[s    cCs
|jƒS(socapitalize(s) -> string
 
    Return a copy of the string s with only its first character
    capitalized.
 
    (t
capitalize(R
((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pyR>gscCs%ttt|j|ƒƒ|p!dƒS(sùcapwords(s, [sep]) -> string
 
    Split the argument into words using split, capitalize each
    word using capitalize, and join the capitalized words using
    join. Note that this replaces runs of whitespace characters by
    a single space.
 
    R(RtmapR>R(R
R((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pytcapwordsqs    cCs‹t|ƒt|ƒkr$td‚nts9ttƒant}tt|ƒ}x,tt|ƒƒD]}|||||<qbWt|dƒS(sÁmaketrans(frm, to) -> string
 
    Return a translation table (a string of 256 bytes long)
    suitable for use in string.translate.  The strings frm and to
    must be of the same length.
 
    s)maketrans arguments must have same lengthR(    R$t
ValueErrort_idmapLtlistt_idmapR?tordtrangeR(tfromstrttostrtLti((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pyt    maketrans~s cCs|j|||ƒS(sñreplace (str, old, new[, maxsplit]) -> string
 
    Return a copy of string str with all occurrences of substring
    old replaced by new. If the optional argument maxsplit is
    given, only the first maxsplit occurrences are replaced.
 
    (treplace(R
toldtnewR((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pyRL’s(t*(RKt    lowercaset    uppercaset
whitespaceN(?t__doc__twarningsRRRRPRQtletterstdigitst    hexdigitst    octdigitsRDRFRJtchrRAt index_errort
atoi_errort
atof_errort
atol_errorR    R R R RRtNoneRt splitfieldsRt
joinfieldstapplyRRRRRRtfloatRtintR%tlongR'RRR"R&R(R+R,R.R5R:R;R>R@RBRKRLtAttributeErrort    stringoldtstropt ImportError(((sQ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/stringold.pyt<module>sz
                    
   
                                                                             
       "