MCPcopy Create free account
hub / github.com/PRIME-RL/PRIME / remove_boxed

Function remove_boxed

data_preprocessing/math_util/__init__.py:301–308  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

299
300
301def remove_boxed(s):
302 left = "\\boxed{"
303 try:
304 assert s[:len(left)] == left
305 assert s[-1] == "}"
306 return s[len(left):-1]
307 except:
308 return None
309
310def _last_boxed_only_string(string):
311 idx = string.rfind("\\boxed")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected