Decodes the string using the codec registered for encoding.
encoding defaults to the default string encoding. errors
may be given to set a different error handling scheme. The default is
'strict', meaning that encoding errors raise
ValueError. Other possible values are 'ignore' and
replace'.
New in version 2.2.
Return an encoded version of the string. Default encoding is the current
default string encoding. errors may be given to set a different
error handling scheme. The default for errors is
'strict', meaning that encoding errors raise a
ValueError. Other possible values are 'ignore' and
'replace'.
New in version 2.0.
Return true if the string ends with the specified suffix,
otherwise return false. With optional start, test beginning at
that position. With optional end, stop comparing at that position.
Return the lowest index in the string where substring sub is
found, such that sub is contained in the range [start,
end). Optional arguments start and end are
interpreted as in slice notation. Return -1 if sub is
not found.
Return true if the string is a titlecased string: uppercase
characters may only follow uncased characters and lowercase characters
only cased ones. Return false otherwise.
Return the string left justified in a string of length width.
Padding is done using spaces. The original string is returned if
width is less than len(s).
Return a copy of the string with all occurrences of substring
old replaced by new. If the optional argument
maxsplit is given, only the first maxsplit occurrences are
replaced.
Return the highest index in the string 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.
Return the string right justified in a string of length width.
Padding is done using spaces. The original string is returned if
width is less than len(s).
Return a list of the words in the string, using sep as the
delimiter string. If maxsplit is given, at most maxsplit
splits are done. If sep is not specified or None, any
whitespace string is a separator.
Return a list of the lines in the string, breaking at line
boundaries. Line breaks are not included in the resulting list unless
keepends is given and true.
Return true if string starts with the prefix, otherwise
return false. With optional start, test string beginning at
that position. With optional end, stop comparing string at that
position.
Return a copy of the string 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.