Trees | Index | Help |
|
---|
Module __builtin__ :: Class unicode |
|
object
--+ |basestring
--+ | unicode
unicode(string [, encoding[, errors]]) -> 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'.Method Summary | |
---|---|
x.__add__(y) <==> x+y | |
x.__cmp__(y) <==> cmp(x,y) | |
x.__contains__(y) <==> y in x | |
x.__getattribute__('name') <==> x.name | |
x.__getitem__(y) <==> x[y] | |
__getnewargs__(...)
| |
Use of negative indices is not supported. | |
x.__hash__() <==> hash(x) | |
x.__len__() <==> len(x) | |
x.__mod__(y) <==> x%y | |
x.__mul__(n) <==> x*n | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
x.__repr__() <==> repr(x) | |
x.__rmod__(y) <==> y%x | |
x.__rmul__(n) <==> n*x | |
x.__str__() <==> str(x) | |
Return a capitalized version of S, i.e. | |
Return S centered in a Unicode string of length width. | |
Return the number of occurrences of substring sub in Unicode string S[start:end]. | |
Decodes S using the codec registered for encoding. | |
Encodes S using the codec registered for encoding. | |
Return True if S ends with the specified suffix, False otherwise. | |
Return a copy of S where all tab characters are expanded using spaces. | |
Return the lowest index in S where substring sub is found, such that sub is contained within s[start,end]. | |
Like S.find() but raise ValueError when the substring is not found. | |
Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise. | |
Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise. | |
Return True if there are only decimal characters in S, False otherwise. | |
Return True if all characters in S are digits and there is at least one character in S, False otherwise. | |
Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise. | |
Return True if there are only numeric characters in S, False otherwise. | |
Return True if all characters in S are whitespace and there is at least one character in S, False otherwise. | |
Return True if S is a titlecased string and there is at least one character in S, i.e. | |
Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise. | |
Return a string which is the concatenation of the strings in the sequence. | |
Return S left justified in a Unicode string of length width. | |
Return a copy of the string S converted to lowercase. | |
Return a copy of the string S with leading whitespace removed. | |
S.replace (old, new[, maxsplit]) -> unicode | |
Return the highest index in S where substring sub is found, such that sub is contained within s[start,end]. | |
Like S.rfind() but raise ValueError when the substring is not found. | |
Return S right justified in a Unicode string of length width. | |
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. | |
Return a copy of the string S with trailing whitespace removed. | |
Return a list of the words in S, using sep as the delimiter string. | |
S.splitlines([keepends]]) -> list of strings | |
Return True if S starts with the specified prefix, False otherwise. | |
Return a copy of the string S with leading and trailing whitespace removed. | |
Return a copy of S with uppercase characters converted to lowercase and vice versa. | |
Return a titlecased version of S, i.e. | |
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. | |
Return a copy of S converted to uppercase. | |
Pad a numeric string x with zeros on the left, to fill a field of the specified width. | |
Inherited from object :
__init__ ,
__delattr__ ,
__reduce__ ,
__reduce_ex__ ,
__setattr__
|
Method Details |
---|
__add__(x,
y)
x.__add__(y) <==> x+y
|
__cmp__(x,
y)
x.__cmp__(y) <==> cmp(x,y)
|
__contains__(x,
y)
x.__contains__(y) <==> y in x
|
__getattribute__(...)x.__getattribute__('name') <==> x.name
|
__getitem__(x,
y)
x.__getitem__(y) <==> x[y]
|
__getslice__(x,
i,
j)
Use of negative indices is not supported.
|
__hash__(x)
x.__hash__() <==> hash(x)
|
__len__(x)
x.__len__() <==> len(x)
|
__mod__(x, y)x.__mod__(y) <==> x%y
|
__mul__(x, n)x.__mul__(n) <==> x*n
|
__new__(T, S, ...)T.__new__(S, ...) -> a new object with type S, a subtype of T
|
__repr__(x)
x.__repr__() <==> repr(x)
|
__rmod__(x, y)x.__rmod__(y) <==> y%x
|
__rmul__(x, n)x.__rmul__(n) <==> n*x
|
__str__(x)
x.__str__() <==> str(x)
|
capitalize(S)Return a capitalized version of S, i.e. make the first character have upper case.
|
center(S, width, fillchar=...)Return S centered in a Unicode string of length width. Padding is done using the specified fill character (default is a space)
|
count(S, sub, start=..., end=...)Return the number of occurrences of substring sub in Unicode string S[start:end]. Optional arguments start and end are interpreted as in slice notation.
|
decode(S, encoding=..., errors=...)Decodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is 'strict' meaning that encoding errors raise a UnicodeDecodeError. Other possible values are 'ignore' and 'replace' as well as any other name registerd with codecs.register_error that is able to handle UnicodeDecodeErrors.
|
encode(S, encoding=..., errors=...)Encodes S using the codec registered for encoding. encoding defaults to the default encoding. errors may be given to set a different error handling scheme. Default is 'strict' meaning that encoding errors raise a UnicodeEncodeError. Other possible values are 'ignore', 'replace' and 'xmlcharrefreplace' as well as any other name registered with codecs.register_error that can handle UnicodeEncodeErrors.
|
endswith(S, suffix, start=..., end=...)Return True if S ends with the specified suffix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position.
|
expandtabs(S, tabsize=...)Return a copy of S where all tab characters are expanded using spaces. If tabsize is not given, a tab size of 8 characters is assumed.
|
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]. Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
|
index(S, sub, start=... , end=...)Like S.find() but raise ValueError when the substring is not found.
|
isalnum(S)Return True if all characters in S are alphanumeric and there is at least one character in S, False otherwise.
|
isalpha(S)Return True if all characters in S are alphabetic and there is at least one character in S, False otherwise.
|
isdecimal(S)Return True if there are only decimal characters in S, False otherwise.
|
isdigit(S)Return True if all characters in S are digits and there is at least one character in S, False otherwise.
|
islower(S)Return True if all cased characters in S are lowercase and there is at least one cased character in S, False otherwise.
|
isnumeric(S)Return True if there are only numeric characters in S, False otherwise.
|
isspace(S)Return True if all characters in S are whitespace and there is at least one character in S, False otherwise.
|
istitle(S)Return True if S is a titlecased string and there is at least one character in S, i.e. upper- and titlecase characters may only follow uncased characters and lowercase characters only cased ones. Return False otherwise.
|
isupper(S)Return True if all cased characters in S are uppercase and there is at least one cased character in S, False otherwise.
|
join(S, sequence)Return a string which is the concatenation of the strings in the sequence. The separator between elements is S.
|
ljust(S, width, fillchar=...)Return S left justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
|
lower(S)Return a copy of the string S converted to lowercase.
|
lstrip(S, chars=...)Return a copy of the string S with leading whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
|
replace(...)S.replace (old, new[, maxsplit]) -> unicode Return a copy of S with all occurrences of substring old replaced by new. If the optional argument maxsplit is given, only the first maxsplit occurrences are replaced. |
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]. Optional arguments start and end are interpreted as in slice notation. Return -1 on failure.
|
rindex(S, sub, start=... , end=...)Like S.rfind() but raise ValueError when the substring is not found.
|
rjust(S, width, fillchar=...)Return S right justified in a Unicode string of length width. Padding is done using the specified fill character (default is a space).
|
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. If maxsplit is given, at most maxsplit splits are done. If sep is not specified, any whitespace string is a separator.
|
rstrip(S, chars=...)Return a copy of the string S with trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
|
split(S, sep=... , maxsplit=...)Return a list of the words in S, using sep as the delimiter string. If maxsplit is given, at most maxsplit splits are done. If sep is not specified or is None, any whitespace string is a separator.
|
splitlines(...)S.splitlines([keepends]]) -> list of strings Return a list of the lines in S, breaking at line boundaries. Line breaks are not included in the resulting list unless keepends is given and true. |
startswith(S, prefix, start=..., end=...)Return True if S starts with the specified prefix, False otherwise. With optional start, test S beginning at that position. With optional end, stop comparing S at that position.
|
strip(S, chars=...)Return a copy of the string S with leading and trailing whitespace removed. If chars is given and not None, remove characters in chars instead. If chars is a str, it will be converted to unicode before stripping
|
swapcase(S)Return a copy of S with uppercase characters converted to lowercase and vice versa.
|
title(S)Return a titlecased version of S, i.e. words start with title case characters, all remaining cased characters have lower case.
|
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. Unmapped characters are left untouched. Characters mapped to None are deleted.
|
upper(S)Return a copy of S converted to uppercase.
|
zfill(S, width)Pad a numeric string x with zeros on the left, to fill a field of the specified width. The string x is never truncated.
|
Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Thu Aug 16 09:55:12 2007 | http://epydoc.sf.net |