MCPcopy
hub / github.com/pallets/werkzeug / _find

Function _find

src/werkzeug/routing/rules.py:87–95  ·  view source on GitHub ↗

Find the *target* in *value* after *pos*. Returns the *value* length if *target* isn't found.

(value: str, target: str, pos: int)

Source from the content-addressed store, hash-verified

85
86
87def _find(value: str, target: str, pos: int) -> int:
88 """Find the *target* in *value* after *pos*.
89
90 Returns the *value* length if *target* isn't found.
91 """
92 try:
93 return value.index(target, pos)
94 except ValueError:
95 return len(value)
96
97
98def _pythonize(value: str) -> None | bool | int | float | str:

Callers

nothing calls this directly

Calls 1

indexMethod · 0.45

Tested by

no test coverage detected