MCPcopy Create free account
hub / github.com/PlatformLab/NanoLog / encode

Function encode

preprocessor/FunctionGenerator.py:894–895  ·  view source on GitHub ↗
(string)

Source from the content-addressed store, hash-verified

892
893def generateLogIdStr(fmtString, filename, linenum):
894 def encode(string):
895 return "".join([c if c.isalnum() else str(ord(c)) for c in string])
896
897 return "__%s__%s__%d__" % (encode(fmtString), encode(filename), linenum)

Callers 1

generateLogIdStrFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected