78 lines
1.9 KiB
Python
Raw Normal View History

from PikaObj import *
2022-09-04 17:50:08 +08:00
A: int
ASCII: int
I: int
IGNORECASE: int
M: int
MULTILINE: int
2022-09-04 17:50:08 +08:00
S: int
DOTALL: int
2022-09-04 17:50:08 +08:00
# here, not as in python, there is no 'UNICODE' flags,
# cause this version only support UTF-8 characters
def __init__(): ...
2022-09-04 17:50:08 +08:00
class Pattern:
def __init__(self):
pass
2022-09-04 17:50:08 +08:00
def __del__(self):
pass
2022-09-04 17:50:08 +08:00
def findall(self, subject: str, *flags) -> list:
pass
2022-09-04 17:50:08 +08:00
def sub(self, repl: str, subjet: str, *count__flags) -> str:
pass
2022-09-04 17:50:08 +08:00
def subn(self, repl: str, subjet: str, *count__flags) -> list:
pass
def match(self, subject: str, *flags) -> Match:
pass
2022-09-04 17:50:08 +08:00
def fullmatch(self, subject: str, *flags) -> Match:
pass
2022-09-04 17:50:08 +08:00
def search(self, subject: str, *flags) -> Match:
pass
2022-09-04 17:50:08 +08:00
def split(self, subject: str, *maxsplit__flags) -> list:
pass
class Match:
def __init__(self):
pass
2022-09-04 17:50:08 +08:00
def __del__(self):
pass
2022-09-04 17:50:08 +08:00
def group(self, *n) -> str:
pass
2022-09-04 17:50:08 +08:00
def groups(self) -> list:
pass
2022-09-04 17:50:08 +08:00
# ! may returns wrong offset when subject contains widechar, like Chinese
# this function returns exactly memory offset between the begin of string and the target substring
def span(self, *group_n) -> list:
pass
2022-09-04 17:50:08 +08:00
def findall(pattern: str, subject: str, *flags) -> list: ...
2022-09-04 17:50:08 +08:00
# def sub(pattern, repl, string, count=0, flags=0)
def sub(pattern: str, repl: str, subjet: str, *count__flags) -> str: ...
def match(pattern: str, subject: str, *flags) -> Match: ...
def fullmatch(pattern: str, subject: str, *flags) -> Match: ...
def search(pattern: str, subject: str, *flags) -> Match: ...
2022-09-04 17:50:08 +08:00
def compile(pattern: str, *flags) -> Pattern: ...
def escape(pattern: str) -> str: ...
# def subn(pattern, repl, string, count=0, flags=0)
def subn(pattern: str, repl: str, subjet: str, *count__flags) -> list: ...
# def finditer(pattern: str, subject: str, *flags):
def split(pattern: str, subject: str, *maxsplit__flags) -> list: ...