格式化文本, {} 表示占位符
此方法只是简单将占位符 {} 按照顺序替换为参数
如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可
例:
通常使用:format("this is {} for {}", "a", "b") -> this is a for b
转义{}: format("this is \\{} for {}", "a", "b") -> this is \{} for a
转义\: format("this is \\\\{} for {}", "a", "b") -> this is \a for b