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

Function dStrrev

engine/source/platformAndroid/AndroidStrings.cpp:356–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354//%PUAP% -Mat -----------------------------------------------------------------------------------------------
355
356int dStrrev(char* str)
357{
358 int l=dStrlen(str)-1; //get the string length
359 for(int x=0;x < l;x++,l--)
360 {
361 str[x]^=str[l]; //triple XOR Trick
362 str[l]^=str[x]; //for not using a temp
363 str[x]^=str[l];
364 }
365 return l;
366}
367
368//-Mat hack
369int dItoa(int n, char s[])

Callers 1

dItoaFunction · 0.70

Calls 1

dStrlenFunction · 0.70

Tested by

no test coverage detected