IN this code, i know the trim will go but i am jus...
# cfml-general
g
IN this code, i know the trim will go but i am just wondering where it will go because the format of the number is having space and its wrong <cfset form.hours = '0 .00'> <cfset rownum = 1> <cfset tmpHours = NumberFormat(trim(form["hours" & rownum]), "-000.00")> <cfdump var="#tmpHours#">
a
trim
will remove leading and trailing whitespace. It won't remove spaces in the middle of your string. If you want to remove all spaces / whitespace in your string then use
replace
/
rereplace
👍 1
g
ah ok, where i need to put that replce or rereplace
a
Depends if you actually want the user to be able to input
0 . 00
or whatever as it's not really valid.
g
its not use4d based, its doing internally