78 lines
1.9 KiB
Python
Raw Normal View History

2022-08-29 12:47:05 +08:00
from PikaObj import *
2022-09-04 17:29:16 +08:00
A: int
ASCII: int
2022-08-29 12:47:05 +08:00
I: int
IGNORECASE: int
2022-08-29 12:47:05 +08:00
M: int
MULTILINE: int
2022-09-04 17:29:16 +08:00
S: int
2022-08-29 12:47:05 +08:00
DOTALL: int
2022-09-04 17:29:16 +08:00
# here, not as in python, there is no 'UNICODE' flags,
# cause this version only support UTF-8 characters
2022-08-29 12:47:05 +08:00
def __init__(): ...
2022-08-29 12:47:05 +08:00
2022-09-04 17:29:16 +08:00
class Pattern:
2022-08-29 12:47:05 +08:00
def __init__(self):
pass
2022-09-04 17:29:16 +08:00
2022-08-29 12:47:05 +08:00
def __del__(self):
pass
2022-09-04 17:29:16 +08:00
2022-08-29 12:47:05 +08:00
def findall(self, subject: str, *flags) -> list:
pass
2022-09-04 17:29:16 +08:00
def sub(self, repl: str, subjet: str, *count__flags) -> str:
2022-08-29 12:47:05 +08:00
pass
2022-09-04 17:29:16 +08:00
def subn(self, repl: str, subjet: str, *count__flags) -> list:
pass
2022-08-29 12:47:05 +08:00
def match(self, subject: str, *flags) -> Match:
pass
2022-09-04 17:29:16 +08:00
2022-08-29 12:47:05 +08:00
def fullmatch(self, subject: str, *flags) -> Match:
pass
2022-09-04 17:29:16 +08:00
2022-08-29 12:47:05 +08:00
def search(self, subject: str, *flags) -> Match:
pass
2022-09-04 17:29:16 +08:00
def split(self, subject: str, *maxsplit__flags) -> list:
pass
class Match:
2022-08-29 12:47:05 +08:00
def __init__(self):
pass
2022-09-04 17:29:16 +08:00
2022-08-29 12:47:05 +08:00
def __del__(self):
pass
2022-09-04 17:29:16 +08:00
def group(self, *n) -> str:
2022-08-29 12:47:05 +08:00
pass
2022-09-04 17:29:16 +08:00
2022-08-29 12:47:05 +08:00
def groups(self) -> list:
pass
2022-09-04 17:29:16 +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:
2022-08-29 12:47:05 +08:00
pass
2022-09-04 17:29:16 +08:00
def findall(pattern: str, subject: str, *flags) -> list: ...
2022-09-04 17:29:16 +08:00
# def sub(pattern, repl, string, count=0, flags=0)
def sub(pattern: str, repl: str, subjet: str, *count__flags) -> str: ...
2022-08-29 12:47:05 +08:00
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:29:16 +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: ...