Add underline to end of text when the last character is a space

I’m trying to add an underline to some text, and the last character is a space, so the underline isn’t added for that character unless another real character is added after that, which is not what I want, I want the space to have the underline. Example text: " This text should have an extra underline at the beginning and end "

I thought maybe there was an underline character I could use, but I can’t seem to find one. The regular underscore character (_) is too thick so it’s not the same.

Any suggestions?

Using the underline character “_” should work. However, the thickness of the underline is defined in the Font Asset Face Info. As such, you may need to adjust it to match the thickness of your Underline character.