Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to remove the last digit?
#4
Function Function9600
Code:
Copy      Help
str ss s results
s=
;125000
;55000
;2500
;34500000
;10000000000
;182309000
;990
foreach(ss s)
,if(findrx(ss ".*0{3}$" 0 1 results)>=0)  ;;finds numbers only that end in 3 zeros
,,results.replacerx("0{3}$" "") ;; removes the 3 zeros from the results of findrx
,,out results


Messages In This Thread
How to remove the last digit? - by BK - 08-15-2018, 11:44 AM
RE: How to remove the last digit? - by TheDane - 08-15-2018, 12:01 PM
RE: How to remove the last digit? - by BK - 08-15-2018, 01:20 PM
RE: How to remove the last digit? - by Kevin - 08-15-2018, 06:25 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)