MCPcopy Create free account
hub / github.com/Integuru-AI/Integuru / swap_string_using_obfuscation_map

Function swap_string_using_obfuscation_map

integuru/util/print.py:324–337  ·  view source on GitHub ↗

Swaps all parts in the input string that match keys in the obfuscation map with their corresponding values. Args: input_string (str): The string to perform replacements on. obfuscation_map (Dict[str, str]): The obfuscation map with keys to be replaced by their values. Returns:

(input_string: str, obfuscation_map: Dict[str, str])

Source from the content-addressed store, hash-verified

322 return obfuscation_map
323
324def swap_string_using_obfuscation_map(input_string: str, obfuscation_map: Dict[str, str]) -> str:
325 """
326 Swaps all parts in the input string that match keys in the obfuscation map with their corresponding values.
327
328 Args:
329 input_string (str): The string to perform replacements on.
330 obfuscation_map (Dict[str, str]): The obfuscation map with keys to be replaced by their values.
331
332 Returns:
333 str: The modified string with replacements made.
334 """
335 for key, value in obfuscation_map.items():
336 input_string = input_string.replace(key, value)
337 return input_string
338
339def print_dag_in_reverse(graph: nx.DiGraph, max_depth: Optional[int] = None, to_generate_code: bool = False) -> None:
340 """

Callers 1

print_dag_in_reverseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected