Files
luci/modules
Jo-Philipp Wich a31eccfa14 luci-base: extend String.format() with named placeholder support
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>
2026-05-28 09:01:19 +02:00
..