Jump to content

String to Int...Int to String


Recommended Posts

  • 5 years later...
  • Moderators

1.  I commend you in searching for an answer before you posted.

2.  However, please be mindful of the date of threads you post in, this thread was 5 years old and is considered necroposting.

10 comma 123 isn't a number is it?  It's a "formatted" number" "string".

$str = "10,123.56"
ConsoleWrite(_IntFromString($str) & @CRLF)

Func _IntFromString($s_str)
    ; strip non digit from string
    Return Int(StringRegExpReplace($s_str, "[^\d\.]", ""))
EndFunc

Try that.

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...