Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Formatting integers in strings

  • To: mathgroup at smc.vnet.net
  • Subject: [mg114409] Re: Formatting integers in strings
  • From: Helen Read <readhpr at gmail.com>
  • Date: Fri, 3 Dec 2010 05:22:40 -0500 (EST)
  • References: <id7t7q$leq$1@smc.vnet.net>

On 12/2/2010 5:43 AM, Dan wrote:
> I seem to be having a brain infarction and cannot see past this simple
> problem. I would like to be able to format a series of integers so
> that they are padded to the left with zeros as in:
>
> {000,030,060,090,120,150,180}
>
> Of course, I can write my own function to do this, but I want to use
> Mathematica's native formatting functionality.

IntegerString[Range[0, 180, 30], 10, 3]



-- 
Helen Read
University of Vermont


  • Prev by Date: Simplify complex equation
  • Next by Date: Confuse to collect the coefficient
  • Previous by thread: Formatting integers in strings
  • Next by thread: Re: Formatting integers in strings