mirror of
https://github.com/openwrt/luci.git
synced 2026-05-31 10:31:55 +08:00
a31eccfa14
Support for %{key} and %{key:fmt} named placeholders in String.format().
The key is looked up in any plain-object argument passed to format(); the
argument list is scanned left-to-right and the first object containing the
key wins, allowing mixing of positional and named substitutions, e.g.:
'%s test %{foo:s}'.format('blah', {bar: true}, {foo: 123})
=> 'blah test 123'
Ref: https://github.com/openwrt/luci/issues/8603#issuecomment-4554956879
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>