MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / dStrrev

Function dStrrev

engine/source/platformEmscripten/EmscriptenStrings.cpp:338–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336}
337
338int dStrrev(char* str)
339{
340 int l=dStrlen(str)-1; //get the string length
341 for(int x=0;x < l;x++,l--)
342 {
343 str[x]^=str[l]; //triple XOR Trick
344 str[l]^=str[x]; //for not using a temp
345 str[x]^=str[l];
346 }
347 return l;
348}
349
350//-Mat hack
351int dItoa(int n, char s[])

Callers 1

dItoaFunction · 0.70

Calls 1

dStrlenFunction · 0.70

Tested by

no test coverage detected