How can I use a dynamic format string with the format! macro?

前端 未结 2 1622
礼貌的吻别
礼貌的吻别 2021-01-03 20:23

I want to use the format! macro with a String as first argument, but because the macro expects a string literal, I am not able pass anything differ

2条回答
  •  醉话见心
    2021-01-03 20:51

    Check out the strfmt library, it is the closest I've found to do dynamic string formatting.

提交回复
热议问题