MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / dStrrev

Function dStrrev

Engine/source/core/strings/stringFunctions.cpp:602–612  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

600}
601
602int dStrrev(char* str)
603{
604 int l=dStrlen(str)-1; //get the string length
605 for(int x=0;x < l;x++,l--)
606 {
607 str[x]^=str[l]; //triple XOR Trick
608 str[l]^=str[x]; //for not using a temp
609 str[x]^=str[l];
610 }
611 return l;
612}
613
614int dItoa(int n, char s[])
615{

Callers 1

dItoaFunction · 0.85

Calls 1

dStrlenFunction · 0.70

Tested by

no test coverage detected