MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / substring

Function substring

src/packagedcode/maven.py:963–975  ·  view source on GitHub ↗

Return a slice of s based on start and end indexes (that can be None).

(s, start, end)

Source from the content-addressed store, hash-verified

961
962
963def substring(s, start, end):
964 """
965 Return a slice of s based on start and end indexes (that can be None).
966 """
967 startless = start is None
968 endless = end is None
969 if startless and endless:
970 return s
971 if endless:
972 return s[start:]
973 if startless:
974 return s[:end]
975 return s[start:end]
976
977
978def has_basic_pom_attributes(pom):

Callers 1

subfuncMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected