Lines Matching refs:pos
27 def find_first_not_restricted_character(restricted: str, data: str, pos: int = 0, pos_end: int = MAX_LEN) -> int:
28 for i in range(pos, min(len(data), pos_end)):
34 def rfind_first_not_restricted_character(restricted: str, data: str, pos: int, pos_end: int = 0) -> int:
36 if pos > len(data):
37 pos = len(data) - 1
38 while pos >= max(0, pos_end):
39 if data[pos] not in restricted:
40 return pos
41 pos -= 1
45 def find_first_of_characters(characters: str, data: str, pos: int = 0, pos_end: int = MAX_LEN) -> int:
46 for i in range(pos, min(len(data), pos_end)):
52 def rfind_first_of_characters(characters: str, data: str, pos: int, pos_end: int = 0) -> int:
54 if pos > len(data):
55 pos = len(data) - 1
56 while pos >= max(0, pos_end):
57 if data[pos] in characters:
58 return pos
59 pos -= 1
65 Returns pos of opening and closing brackets in 'data'.
124 def smart_find_first_of_characters(characters: str, data: str, pos: int) -> int:
125 i = pos