MCPcopy Create free account
hub / github.com/PageBot/PageBot / idCommaString2IdSet

Function idCommaString2IdSet

Lib/pagebot/toolbox/transformer.py:437–445  ·  view source on GitHub ↗

Transform a string with comma separated items into a set of id integers.

(s)

Source from the content-addressed store, hash-verified

435 return ', '.join(t)
436
437def idCommaString2IdSet(s):
438 """Transform a string with comma separated items into a set of id integers."""
439 t = set()
440 if s is not None:
441 for value in s.split(','):
442 value = asInt(value)
443 if value is not None:
444 t.add(value)
445 return t
446
447def commaString2IntegerList(s):
448 l = []

Callers

nothing calls this directly

Calls 2

asIntFunction · 0.85
addMethod · 0.80

Tested by

no test coverage detected