Download

cast a FString to an int32?

Is this even possible? I can not find a function that covers that.

Example code, will not work



FString aWord = "5";

int32 IntSetting = int32(aWord);


trying to put a 5 into IntSetting.

Atoi or LexFromString will do it. Just casting a string to an integer won’t do anything.

sweet, thanks for the reminder of Atoi

Thanks for the info. I ended up using LexFromString. < Much nicer and easier to use then Atoi.

Atoi was a pain to get it working right. Was having troubles going from a FString to a Chartype* then trying to convert it with Atoi to spit out an int32.