- Unicode-friendly: accepts 8-bit and 32-bit strings and returns
STRING_32. - Familiar
{}placeholders and a practical subset of Python's format specification mini-language. - Decimal precision, digit grouping, width, alignment, custom fill, zero padding, explicit signs, scientific notation, and much more.
Just call {SHABLON}.format:
local message: STRING_32 do message := {SHABLON}.format ("Hello, {}!", "Alice") -- Hello, Alice! message := {SHABLON}.format ("{0} invited {1}; thanks, {0}!", "Alice", "Bob") -- Alice invited Bob; thanks, Alice! message := {SHABLON}.format ("Total: {:,.2f}", 12345.5) -- Total: 12,345.50 end
Inherit SHABLON to call format directly. Each call returns a fresh STRING_32.
See SHABLON for call styles and explicit tuples, and the
grammar for formatting options and error rules.
Clone the library into your application:
git clone https://github.com/Eiffel-Workshop/shablon.git vendor/shablon
Reference it from your application's ECF:
<library name="shablon" location="vendor/shablon/shablon.ecf" readonly="true"/>
Set GOBO to your Gobo installation and GOBO_EIFFEL to ge or ise.
The library is void-safe and uses standard Eiffel classes.
For development, run just test or just example; see the justfile.
Licensed under Apache License 2.0. Copyright 2026 samedit66.