Bug when using negative numbers in FString.Mid

Example :

FString a="hello"
FString b= a.Mid(0, -1));

this returns b =a , where it should return b as an empty string and not equal full string of a.


Thanks for report! I’ve assigned someone to look into this issue, and they’ll post here if they have any questions.


Thank you for reporting this issue about using negative numbers in FString::Mid function. I’ve reported this issue in our database under number UE-18756. At moment I’m unsure of way that this will be fixed but I speculate it’ll either be made so that if given a negative number it’ll treat it as a 0 or cause an assert to let user know.

Have a nice day,

Thanks , and good luck!!

Just abs number and that will be fine :slight_smile: