MCPcopy Create free account
hub / github.com/IBM/ACPBench / remove_garbage

Function remove_garbage

src/evaluate_gen.py:15–23  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

13
14
15def remove_garbage(s):
16 while True:
17 if s.endswith("."):
18 s=s[:-1]
19 elif s.endswith("\n"):
20 s=s[:-2]
21 else:
22 break
23 return s.rstrip()
24
25def compare_str(s1, s2):
26 return remove_garbage(s1).lower() == remove_garbage(s2).lower()

Callers 1

compare_strFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected