Re: Number to string headed by zeros
- To: mathgroup at smc.vnet.net
- Subject: [mg110317] Re: Number to string headed by zeros
- From: Albert Retey <awnl at gmx-topmail.de>
- Date: Sun, 13 Jun 2010 04:10:13 -0400 (EDT)
- References: <huvk6s$rse$1@smc.vnet.net>
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