How to Search a FText?

I’m trying to create a ‘search’ functionality, however, I’m not sure how to do a check to see if a FText contains another FText. So far, the only approach I see is converting it to a FString, which it says is a dangerous conversion in the documentation. Is there a reason for this limitation?

Uh… is that really what you want to do?

Keep in mind, the whole point of FText is to be the string type which gets displayed to the end user and is localized to their language. If you’re doing regular expression comparison, keep in mind that you don’t want to assume that the text will be in english or ASCII (pretend its in UTF-8 and chinese). Does what you’re doing still make sense? If yes, then you can probably look for a “string in string” method within the API and optionally look into casting your text into a string version which has it. Search for strinstr() or substring()