function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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.