Re: time format, on leadZero(x)
Re: time format, on leadZero(x)
- Subject: Re: time format, on leadZero(x)
- From: Skeeve <email@hidden>
- Date: Mon, 19 Nov 2007 07:36:41 +0100
Skeeve wrote:
How about this alternative?
-- leftfill of 4711 by "000000" => "004711"
to leftfill of aNumber by pattern
set aNumber to aNumber as string
set missing to (length of pattern) - (length of aNumber)
if missing <= 0 then return aNumber
return (text 1 thru missing of pattern) & aNumber
end leftfill
Of course without the "*". Sorry! Didn't know my stupid mailer puts them
in when pasting my code from
http://www.fischer-bayern.de/phpBB2/viewtopic.php?t=2330
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden