Why does string.format() limit width to two digits?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Why does string.format() limit width to two digits?
- From: Andreas Falkenhahn <andreas@...>
- Date: 2023年1月18日 19:33:38 +0100
Hi,
I was wondering why Lua's string.format() limits the width and precision fields to two digits. E.g. this doesn't work in Lua because we use a width of 100 (99 works fine):
string.format('%100s', 'hello world')
Is there any particular reason why Lua imposes this limit on string.format()? I'm just wondering because this restriction sometimes makes it difficult to port C code to Lua.
--
Best regards,
Andreas Falkenhahn mailto:andreas@falkenhahn.com