basil icon indicating copy to clipboard operation
basil copied to clipboard

String formatting

Open minchingtonak opened this issue 4 years ago • 1 comments

Basil should have some way to easily format strings. Here are a couple syntax proposals.

The percent symbol could be swapped out for something like # or $.

  • ("hello %0 %1" format "world" true) -> yields "hello world true"
  • `hello %{"world"} %{true}` -> yields "hello world true"

minchingtonak avatar Jan 03 '21 19:01 minchingtonak

Hm, I'd prefer as much compatibility with existing string formatting & interpolation solutions (beginning with printf from the C standard through V up to e.g. Python).

dumblob avatar Jan 03 '21 21:01 dumblob