Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Quickest Way to convert Int/Flot to String

    Hello there, what would be the easiest and quickest way to convert int or float to string from the command line?

  • #2
    Code:
    help tostring

    Comment


    • #3
      Why do you want to do this? tostring was provided as a complement or inverse to destring, but it's not always clear why people want or need it!

      Comment


      • #4
        I don't speak for the OP, but about the only times when I've done such conversions are

        1. to convert numeric ID values, which can occur after importing a text- or comma-delimited spreadsheet file where a column of ID numbers wasn't saved as string (enclosed in double-quotation marks) and some have lost their leading zeros, and

        2. to export formatted floating-point numbers to an Excel worksheet where a colleague wants to pretty print them (for example, in a so-called line listing) without having to go to the effort to format the numbers inside Excel.

        Comment

        Working...
        X