MathGroup Archive 2010

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

Search the Archive

Re: Number to string headed by zeros


Am 12.06.2010 11:32, schrieb Rui:
> I need to create strings out of integers, padding them with zeros,
> cause otherwise they end up sorted in the wrong order. "10.gif" before "1.gif".
> For now I'm gonna do it by adding 1000, converting to string, and
> taking the heading 1, but I'm sure there are better options. THanks

You are looking for IntegerString, e.g.:

IntegerString[1, 10, 3]

hth,

albert


  • Prev by Date: Re: Answer
  • Next by Date: Re: Number to string headed by zeros
  • Previous by thread: Number to string headed by zeros
  • Next by thread: Re: Number to string headed by zeros