MCPcopy
hub / github.com/tornadoweb/tornado / find

Method find

tornado/template.py:789–801  ·  view source on GitHub ↗
(self, needle: str, start: int = 0, end: Optional[int] = None)

Source from the content-addressed store, hash-verified

787 self.pos = 0
788
789 def find(self, needle: str, start: int = 0, end: Optional[int] = None) -> int:
790 assert start >= 0, start
791 pos = self.pos
792 start += pos
793 if end is None:
794 index = self.text.find(needle, start)
795 else:
796 end += pos
797 assert end >= start
798 index = self.text.find(needle, start, end)
799 if index != -1:
800 index -= pos
801 return index
802
803 def consume(self, count: Optional[int] = None) -> str:
804 if count is None:

Callers 10

_find_read_posMethod · 0.80
parseMethod · 0.80
_parseparamFunction · 0.80
_parse_headerFunction · 0.80
_parse_headersMethod · 0.80
_parseFunction · 0.80
getMethod · 0.80
newMessageFunction · 0.80
newMessageFunction · 0.80

Calls

no outgoing calls

Tested by 1

getMethod · 0.64