String question

I think this has to do with string anyways, or length…

Say i have a function that calculates a nubmer, it outputs a dollar value, so i
lets say the output should be $1.40 , it would output $1.4, that looks a bit funny, so is there a way to check the length after the decimal, and if it’s only 1 char long, to add a 0?