screpl.encoder.encoder module ¶
-
screpl.encoder.encoder.
_read_until_delimiter
( _b , delim ) [source] ¶ -
EUDFuncN
- Moves reader just before specific character.It reads zero or more spaces and check the following character.
-
screpl.encoder.encoder.
read_name
( offset , delim , ref_offset_epd , ref_retval_epd ) [source] ¶ -
EUDFuncN
- Reads string and extracts corresponding symbolIt reads following regex:
regex_symbol = r"[_a-zA-Z][_0-9a-zA-Z]*"
Examples
MyCommand _abc02
ref_retval_epd is pointer for Db
-
screpl.encoder.encoder.
read_number
( offset , delim , ref_offset_epd , ref_retval_epd ) [source] ¶ -
EUDFuncN
- Reads string and extracts corresponding number.It reads following regular expression:
regex_decimal = r"[-]?[1-9][0-9]*" regex_hexadecimal = r"[-]?0x[0-9A-Fa-f]+"
Examples
0x1535 -9000
-
screpl.encoder.encoder.
read_string
( offset , delim , ref_offset_epd , ref_retval_epd ) [source] ¶ -
EUDFuncN
- Reads string wrapped with “It reads following regex:
regex_string = r"[usual_character]*" regex_character = range(0x20, 0x7F) # except ord(""") = 34
Examples
"string1" "my string"
ref_retval_epd is pointer for Db