MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / chunk_text

Function chunk_text

keepercommander/utils.py:295–305  ·  view source on GitHub ↗
(text, func)

Source from the content-addressed store, hash-verified

293
294
295def chunk_text(text, func): # type (str, Callable[[str], bool]) -> Iterable[str]
296 acc = ''
297 for x in text:
298 if func(x):
299 acc += x
300 else:
301 if acc:
302 yield acc
303 acc = ''
304 if acc:
305 yield acc
306
307
308def offset_char(text, func): # type (str, Callable[[str, str], int]) -> Iterable[int]

Callers 1

password_scoreFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected