Vega strike Python Modules doc
0.5.1
Documentation of the " Modules " folder of Vega strike
|
Functions | |
def | lower |
def | upper |
def | swapcase |
def | strip |
def | lstrip |
def | rstrip |
def | split |
def | join |
def | index |
def | rindex |
def | count |
def | find |
def | rfind |
def | atof |
def | atoi |
def | atol |
def | ljust |
def | rjust |
def | center |
def | zfill |
def | expandtabs |
def | translate |
def | capitalize |
def | capwords |
def | maketrans |
def | replace |
Variables | |
string | whitespace = ' \t\n\r\v\f' |
string | lowercase = 'abcdefghijklmnopqrstuvwxyz' |
string | uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
letters = lowercase+uppercase | |
ascii_lowercase = lowercase | |
ascii_uppercase = uppercase | |
ascii_letters = ascii_lowercase+ascii_uppercase | |
string | digits = '0123456789' |
string | hexdigits = digits+'abcdef' |
string | octdigits = '01234567' |
string | punctuation = """!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~""" |
printable = digits+letters+punctuation+whitespace | |
string | _idmap = '' |
index_error = ValueError | |
atoi_error = ValueError | |
atof_error = ValueError | |
atol_error = ValueError | |
splitfields = split | |
joinfields = join | |
_float = float | |
_int = int | |
_long = long | |
tuple | _StringType = type('') |
_idmapL = None | |
A collection of string operations (most are no longer used in Python 1.6). Warning: most of the code you see here isn't normally used nowadays. With Python 1.6, many of these functions are implemented as methods on the standard string object. They used to be implemented by a built-in module called strop, but strop is now obsolete itself. 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 punctuation -- a string containing all characters considered punctuation printable -- a string containing all characters considered printable
def string.atoi | ( | s, | |
base = 10 |
|||
) |
atoi(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.
Definition at line 206 of file string.py.
References _int.
def string.atol | ( | s, | |
base = 10 |
|||
) |
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.
Definition at line 221 of file string.py.
References _long.
def string.capitalize | ( | s) |
def string.capwords | ( | s, | |
sep = None |
|||
) |
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.
Definition at line 331 of file string.py.
References join().
def string.center | ( | s, | |
width | |||
) |
def string.count | ( | s, | |
args | |||
) |
def string.expandtabs | ( | s, | |
tabsize = 8 |
|||
) |
def string.find | ( | s, | |
args | |||
) |
find(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.
Definition at line 164 of file string.py.
def string.index | ( | s, | |
args | |||
) |
index(s, sub [,start [,end]]) -> int Like find but raises ValueError when the substring is not found.
def string.join | ( | words, | |
sep = ' ' |
|||
) |
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)
def string.ljust | ( | s, | |
width | |||
) |
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.
def string.lower | ( | s) |
def string.lstrip | ( | s) |
lstrip(s) -> string Return a copy of the string s with leading whitespace removed.
def string.maketrans | ( | fromstr, | |
tostr | |||
) |
def string.replace | ( | s, | |
old, | |||
new, | |||
maxsplit = -1 |
|||
) |
def string.rfind | ( | s, | |
args | |||
) |
rfind(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.
Definition at line 177 of file string.py.
def string.rindex | ( | s, | |
args | |||
) |
rindex(s, sub [,start [,end]]) -> int Like rfind but raises ValueError when the substring is not found.
def string.rjust | ( | s, | |
width | |||
) |
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.
def string.rstrip | ( | s) |
rstrip(s) -> string Return a copy of the string s with trailing whitespace removed.
def string.split | ( | s, | |
sep = None , |
|||
maxsplit = -1 |
|||
) |
split(s [,sep [,maxsplit]]) -> list of strings Return a list of the words in the string s, using sep as the delimiter string. If maxsplit is given, splits at no more than maxsplit places (resulting in at most maxsplit+1 words). If sep is not specified, any whitespace string is a separator. (split and splitfields are synonymous)
Definition at line 106 of file string.py.
def string.strip | ( | s) |
strip(s) -> string Return a copy of the string s with leading and trailing whitespace removed.
def string.swapcase | ( | s) |
swapcase(s) -> string Return a copy of the string s with upper case characters converted to lowercase and vice versa.
def string.translate | ( | s, | |
table, | |||
deletions = "" |
|||
) |
translate(s,table [,deletions]) -> string Return a copy of the string s, where all characters occurring in the optional argument deletions are removed, and the remaining characters have been mapped through the given translation table, which must be a string of length 256. The deletions argument is not allowed for Unicode strings.
Definition at line 301 of file string.py.
def string.upper | ( | s) |
def string.zfill | ( | x, | |
width | |||
) |
ascii_letters = ascii_lowercase+ascii_uppercase |
printable = digits+letters+punctuation+whitespace |
string punctuation = """!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~""" |