unicode(object='') -> unicode object unicode(string[, encoding[,
errors]]) -> unicode object
Create a new Unicode object from the given encoded string. encoding
defaults to the current default string encoding. errors can be 'strict',
'replace' or 'ignore' and defaults to 'strict'.
|
|
|
__contains__(x,
y)
y in x |
|
|
|
|
unicode
|
__format__(S,
format_spec)
Return a formatted version of S as described by format_spec. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
a new object with type S, a subtype of T
|
|
|
|
|
|
|
|
size of S in memory, in bytes
|
|
|
|
|
_formatter_field_name_split(...) |
|
|
|
|
unicode
|
capitalize(S)
Return a capitalized version of S, i.e. |
|
|
unicode
|
center(S,
width,
fillchar=...)
Return S centered in a Unicode string of length width. |
|
|
int
|
count(S,
sub,
start=...,
end=...)
Return the number of non-overlapping occurrences of substring sub in
Unicode string S[start:end]. |
|
|
string or unicode
|
decode(S,
encoding=...,
errors=...)
Decodes S using the codec registered for encoding. |
|
|
string or unicode
|
encode(S,
encoding=...,
errors=...)
Encodes S using the codec registered for encoding. |
|
|
bool
|
endswith(S,
suffix,
start=...,
end=...)
Return True if S ends with the specified suffix, False otherwise. |
|
|
unicode
|
expandtabs(S,
tabsize=...)
Return a copy of S where all tab characters are expanded using
spaces. |
|
|
int
|
find(S,
sub,
start=... ,
end=...)
Return the lowest index in S where substring sub is found, such that
sub is contained within S[start:end]. |
|
|
unicode
|
format(S,
*args,
**kwargs)
Return a formatted version of S, using substitutions from args and
kwargs. |
|
|
int
|
index(S,
sub,
start=... ,
end=...)
Like S.find() but raise ValueError when the substring is not found. |
|
|
bool
|
isalnum(S)
Return True if all characters in S are alphanumeric and there is at
least one character in S, False otherwise. |
|
|
bool
|
isalpha(S)
Return True if all characters in S are alphabetic and there is at
least one character in S, False otherwise. |
|
|
bool
|
isdecimal(S)
Return True if there are only decimal characters in S, False
otherwise. |
|
|
bool
|
isdigit(S)
Return True if all characters in S are digits and there is at least
one character in S, False otherwise. |
|
|
bool
|
islower(S)
Return True if all cased characters in S are lowercase and there is
at least one cased character in S, False otherwise. |
|
|
bool
|
isnumeric(S)
Return True if there are only numeric characters in S, False
otherwise. |
|
|
bool
|
isspace(S)
Return True if all characters in S are whitespace and there is at
least one character in S, False otherwise. |
|
|
bool
|
istitle(S)
Return True if S is a titlecased string and there is at least one
character in S, i.e. |
|
|
bool
|
isupper(S)
Return True if all cased characters in S are uppercase and there is
at least one cased character in S, False otherwise. |
|
|
unicode
|
join(S,
iterable)
Return a string which is the concatenation of the strings in the
iterable. |
|
|
int
|
ljust(S,
width,
fillchar=...)
Return S left-justified in a Unicode string of length width. |
|
|
unicode
|
lower(S)
Return a copy of the string S converted to lowercase. |
|
|
unicode
|
lstrip(S,
chars=...)
Return a copy of the string S with leading whitespace removed. |
|
|
(head, sep, tail)
|
partition(S,
sep)
Search for the separator sep in S, and return the part before it, the
separator itself, and the part after it. |
|
|
unicode
|
replace(S,
old,
new,
count=...)
Return a copy of S with all occurrences of substring old replaced by
new. |
|
|
int
|
rfind(S,
sub,
start=... ,
end=...)
Return the highest index in S where substring sub is found, such that
sub is contained within S[start:end]. |
|
|
int
|
rindex(S,
sub,
start=... ,
end=...)
Like S.rfind() but raise ValueError when the substring is not found. |
|
|
unicode
|
rjust(S,
width,
fillchar=...)
Return S right-justified in a Unicode string of length width. |
|
|
(head, sep, tail)
|
rpartition(S,
sep)
Search for the separator sep in S, starting at the end of S, and
return the part before it, the separator itself, and the part after
it. |
|
|
list of strings
|
rsplit(S,
sep=... ,
maxsplit=...)
Return a list of the words in S, using sep as the delimiter string,
starting at the end of the string and working to the front. |
|
|
unicode
|
rstrip(S,
chars=...)
Return a copy of the string S with trailing whitespace removed. |
|
|
list of strings
|
split(S,
sep=... ,
maxsplit=...)
Return a list of the words in S, using sep as the delimiter string. |
|
|
list of strings
|
splitlines(S,
keepends=False)
Return a list of the lines in S, breaking at line boundaries. |
|
|
bool
|
startswith(S,
prefix,
start=...,
end=...)
Return True if S starts with the specified prefix, False otherwise. |
|
|
unicode
|
strip(S,
chars=...)
Return a copy of the string S with leading and trailing whitespace
removed. |
|
|
unicode
|
swapcase(S)
Return a copy of S with uppercase characters converted to lowercase
and vice versa. |
|
|
unicode
|
title(S)
Return a titlecased version of S, i.e. |
|
|
unicode
|
translate(S,
table)
Return a copy of the string S, where all characters have been mapped
through the given translation table, which must be a mapping of
Unicode ordinals to Unicode ordinals, Unicode strings or None. |
|
|
unicode
|
upper(S)
Return a copy of S converted to uppercase. |
|
|
unicode
|
zfill(S,
width)
Pad a numeric string S with zeros on the left, to fill a field of the
specified width. |
|
|
Inherited from object :
__delattr__ ,
__init__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__ ,
__subclasshook__
|