MCPcopy Create free account
hub / github.com/DaedalusX64/daedalus / Restore

Function Restore

Source/Utility/Translate.cpp:216–235  ·  view source on GitHub ↗

Restores escape characters which were removed when parsing Which are needed by line-breaking and back-slash

Source from the content-addressed store, hash-verified

214// Which are needed by line-breaking and back-slash
215//*****************************************************************************
216const char * Restore(char *s, u32 len)
217{
218 for (u32 i = 0; i < len; i++)
219 {
220 if (s[i] == '\\')
221 {
222 if( s[i+1] == 'n' )
223 {
224 s[i+1] = '\b'; s[i] = '\n';
225 i++;
226 }
227 else if( s[i+1] == '\\' )
228 {
229 s[i+1] = '\b'; s[i] = '\\';
230 i++;
231 }
232 }
233 }
234 return s;
235}
236
237//*****************************************************************************
238//

Callers 1

Translate_ReadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected