+ Start a Discussion
javierjiesjavierjies 

Float to String

Hello everyone!!

 

I'm just trying to develop in APEX code something I used to do very often with JAVA. I want to convert float to String

( 200 -> two hundred) 

 

 Thank you so much!!

 

 

J A V I

Best Answer chosen by Admin (Salesforce Developers) 
jpwagnerjpwagner

I don't think there's any built-in function for this, but I could be wrong.

 

If not, I'd split each number into it's base 10 components and write helper methods to spell out individual things: so for a number like 437

 

437 = 4 X 100 + 3 X 10 + 7 = hundredsmethod(4) + tensmethod(3) + onesmethod(7) = four-hundred-thirty-seven

 

hope that's a helpful thought.