How Do I get the return value of an expression function?

I have an expression Function, basically taking Item names (Which I use for animations of objects etc so have to be without spaces) and returns a value of the Item name as it would be displayed for the player with spaces.

but I am struggling with finding this function in the expression editor to return a text value

I can only find it if I use the ToString function in my modify text action but that converts it into a number and the result ends up being 0. It works with returning numbers but not text. what Function can I use to return text?