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 | |
string | digits = '0123456789' |
string | hexdigits = digits+'abcdef' |
string | octdigits = '01234567' |
string | _idmap = '' |
index_error = ValueError | |
atoi_error = ValueError | |
atof_error = ValueError | |
atol_error = ValueError | |
splitfields = split | |
joinfields = join | |
_apply = apply | |
_float = float | |
_int = int | |
_long = long | |
tuple | _StringType = type('') |
_idmapL = None | |
def stringold.atof | ( | s) |
atof(s) -> float Return the floating point number represented by the string s.
Definition at line 194 of file stringold.py.
References _float.
def stringold.atoi | ( | args) |
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 207 of file stringold.py.
References _apply.
def stringold.atol | ( | args) |
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 234 of file stringold.py.
References _apply.
def stringold.capitalize | ( | s) |
capitalize(s) -> string Return a copy of the string s with only its first character capitalized.
Definition at line 356 of file stringold.py.
def stringold.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 367 of file stringold.py.
References join().
def stringold.center | ( | s, | |
width | |||
) |
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.
Definition at line 288 of file stringold.py.
def stringold.count | ( | s, | |
args | |||
) |
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.
Definition at line 151 of file stringold.py.
References _apply.
def stringold.expandtabs | ( | s, | |
tabsize = 8 |
|||
) |
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).
Definition at line 325 of file stringold.py.
def stringold.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 162 of file stringold.py.
References _apply.
def stringold.index | ( | s, | |
args | |||
) |
index(s, sub [,start [,end]]) -> int Like find but raises ValueError when the substring is not found.
Definition at line 133 of file stringold.py.
References _apply.
def stringold.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)
Definition at line 116 of file stringold.py.
def stringold.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.
Definition at line 262 of file stringold.py.
def stringold.lower | ( | s) |
lower(s) -> string Return a copy of the string s converted to lowercase.
Definition at line 43 of file stringold.py.
def stringold.lstrip | ( | s) |
lstrip(s) -> string Return a copy of the string s with leading whitespace removed.
Definition at line 81 of file stringold.py.
def stringold.maketrans | ( | fromstr, | |
tostr | |||
) |
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.
Definition at line 380 of file stringold.py.
References join().
def stringold.replace | ( | s, | |
old, | |||
new, | |||
maxsplit = 0 |
|||
) |
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.
Definition at line 400 of file stringold.py.
def stringold.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 175 of file stringold.py.
References _apply.
def stringold.rindex | ( | s, | |
args | |||
) |
rindex(s, sub [,start [,end]]) -> int Like rfind but raises ValueError when the substring is not found.
Definition at line 142 of file stringold.py.
References _apply.
def stringold.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.
Definition at line 275 of file stringold.py.
def stringold.rstrip | ( | s) |
rstrip(s) -> string Return a copy of the string s with trailing whitespace removed.
Definition at line 90 of file stringold.py.
def stringold.split | ( | s, | |
sep = None , |
|||
maxsplit = 0 |
|||
) |
split(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)
Definition at line 101 of file stringold.py.
def stringold.strip | ( | s) |
strip(s) -> string Return a copy of the string s with leading and trailing whitespace removed.
Definition at line 71 of file stringold.py.
def stringold.swapcase | ( | s) |
swapcase(s) -> string Return a copy of the string s with upper case characters converted to lowercase and vice versa.
Definition at line 61 of file stringold.py.
def stringold.translate | ( | s, | |
table, | |||
deletions = "" |
|||
) |
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.
Definition at line 344 of file stringold.py.
def stringold.upper | ( | s) |
upper(s) -> string Return a copy of the string s converted to uppercase.
Definition at line 52 of file stringold.py.
def stringold.zfill | ( | x, | |
width | |||
) |
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.
Definition at line 307 of file stringold.py.
_apply = apply |
Definition at line 130 of file stringold.py.
_float = float |
Definition at line 188 of file stringold.py.
string _idmap = '' |
Definition at line 32 of file stringold.py.
_idmapL = None |
Definition at line 379 of file stringold.py.
_int = int |
Definition at line 189 of file stringold.py.
_long = long |
Definition at line 190 of file stringold.py.
tuple _StringType = type('') |
Definition at line 191 of file stringold.py.
atof_error = ValueError |
Definition at line 39 of file stringold.py.
atoi_error = ValueError |
Definition at line 38 of file stringold.py.
atol_error = ValueError |
Definition at line 40 of file stringold.py.
string digits = '0123456789' |
Definition at line 27 of file stringold.py.
string hexdigits = digits+'abcdef' |
Definition at line 28 of file stringold.py.
index_error = ValueError |
Definition at line 37 of file stringold.py.
joinfields = join |
Definition at line 127 of file stringold.py.
Definition at line 26 of file stringold.py.
string lowercase = 'abcdefghijklmnopqrstuvwxyz' |
Definition at line 24 of file stringold.py.
string octdigits = '01234567' |
Definition at line 29 of file stringold.py.
splitfields = split |
Definition at line 113 of file stringold.py.
string uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
Definition at line 25 of file stringold.py.
string whitespace = ' \t\n\r\v\f' |
Definition at line 23 of file stringold.py.