11#ifdef LIBCARLA_INCLUDED_FROM_UE4
13#include "UnrealString.h"
20#ifdef LIBCARLA_INCLUDED_FROM_UE4
23 static inline std::string FromFString(
const FString &Str) {
24 return TCHAR_TO_UTF8(*Str);
28 static inline FString ToFString(
const std::string &str) {
29 return FString(str.size(), UTF8_TO_TCHAR(str.c_str()));
32 constexpr size_t MaxStringLength = 5000000;
35 static inline std::string FromLongFString(
const FString &Str) {
38 while(i + MaxStringLength < Str.Len()) {
39 auto Substr = Str.Mid(i, MaxStringLength);
40 std::string temp_string = TCHAR_TO_UTF8(*Substr);
41 result += temp_string;
44 auto Substr = Str.Mid(i, Str.Len() - i);
45 std::string temp_string = TCHAR_TO_UTF8(*Substr);
46 result += temp_string;
51 static inline FString ToLongFString(
const std::string &str) {
53 for (
size_t i = 0; i < str.size(); i++)
This file contains definitions of common data structures used in traffic manager.