[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: printf is a crappy language in a crappy language (was Re: [OT] Lua community and Go language)
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 19 Aug 2013 11:09:08 +0200
On Mon, Aug 19, 2013 at 10:23 AM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> But gentlemen, I fear we are drifting off topic, unless someone can
> pull in Lua really quickly.
Here's the C#-style in Lua, without error checking and starting at 1
function tr (fmt,...)
local args = {...}
fmt = localize(fmt)
return (fmt:gsub('{(%d+)}',function(idx)
idx = tonumber(idx)
local arg = args[idx]
return tostring(arg)
end))
end
- References:
- [OT] Lua community and Go language, Lorenzo Donati
- Re: [OT] Lua community and Go language, Sven Olsen
- Re: [OT] Lua community and Go language, Gé Weijers
- Re: [OT] Lua community and Go language, Miles Bader
- Re: [OT] Lua community and Go language, Craig Barnes
- Re: [OT] Lua community and Go language, Rena
- Re: [OT] Lua community and Go language, Lorenzo Donati
- Re: [OT] Lua community and Go language, steve donovan
- printf is a crappy language in a crappy language (was Re: [OT] Lua community and Go language), Jay Carlson
- Re: printf is a crappy language in a crappy language (was Re: [OT] Lua community and Go language), William Ahern
- Re: printf is a crappy language in a crappy language (was Re: [OT] Lua community and Go language), Jay Carlson
- Re: printf is a crappy language in a crappy language (was Re: [OT] Lua community and Go language), Andres Perera
- Re: printf is a crappy language in a crappy language (was Re: [OT] Lua community and Go language), Jay Carlson
- Re: printf is a crappy language in a crappy language (was Re: [OT] Lua community and Go language), Andres Perera
- Re: printf is a crappy language in a crappy language (was Re: [OT] Lua community and Go language), Tim Hill
- Re: printf is a crappy language in a crappy language (was Re: [OT] Lua community and Go language), steve donovan
- Re: printf is a crappy language in a crappy language (was Re: [OT] Lua community and Go language), Coda Highland
- Re: printf is a crappy language in a crappy language (was Re: [OT] Lua community and Go language), steve donovan
- Re: printf is a crappy language in a crappy language (was Re: [OT] Lua community and Go language), Coda Highland
- Re: printf is a crappy language in a crappy language (was Re: [OT] Lua community and Go language), steve donovan