MCPcopy
hub / github.com/lm-sys/FastChat / right_replace

Function right_replace

fastchat/train/train_yuan2.py:96–97  ·  view source on GitHub ↗
(string, old, new, max=1)

Source from the content-addressed store, hash-verified

94
95# add by wpf for yuan test
96def right_replace(string, old, new, max=1):
97 return string[::-1].replace(old[::-1], new[::-1], max)[::-1]
98
99
100def preprocess(

Callers 1

preprocessFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…