Download

FString hexidecimal?

Hey! Any idea, how to get hexidecimal out of FString?

in NodeJS, I have this:

newString = new Buffer(nameCandidate).toString(‘hex’))

In Unreal, there are some internal function like BytesToHex, StringToBytes, but I am not sure how to put them all together to make some FString newS = oldString.ToHexidecimal()

Made the code finally, if someone ever needs it:

const TCHAR* CharPos = *incomingName;
FString Result;

while (*CharPos)
{
    int8 In = (int8)(*CharPos);
    Result += NibbleToTChar(In >> 4);
    Result += NibbleToTChar(In & 15);
    CharPos++;
}

incomingName = "x-" + Result.ToLower();