Skip to content

Instantly share code, notes, and snippets.

@pnegri
Created April 18, 2014 22:32
Show Gist options
  • Save pnegri/11067172 to your computer and use it in GitHub Desktop.
Save pnegri/11067172 to your computer and use it in GitHub Desktop.
//oo FString
std::ostream& operator<<( std::ostream & s, const FString& c )
{
//uint8 *dstBuffer = new uint8[ fstringLength ];
//FString::ToBlob( c, dstBuffer, c.Len());
FTCHARToUTF8 Converter(*c);
uint16 fstringLength = Converter.Length();
s.write( reinterpret_cast<const char*>(&fstringLength), sizeof(fstringLength) );
s.write( reinterpret_cast<const char*>((ANSICHAR*)Converter.Get()), fstringLength );
return s;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment