StrUtil.format
时间: 2023-08-25 12:15:53 浏览: 161
StrUtil.java
StrUtil.format方法是Hutool工具包中的一个字符串格式化方法,它类似于slf4j的占位符进行字符串拼接。使用该方法可以将一个带有占位符的模板字符串中的占位符替换成指定的参数值。例如,给定一个模板字符串"{}爱{},就像老鼠爱大米",使用StrUtil.format(template, "我", "你")即可将模板中的占位符{}分别替换为"我"和"你",得到最终的字符串"我爱你,就像老鼠爱大米"。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [Strutil.format,hasBlank、hasEmpty 以及 removePrefix、removeSuffix方法](https://blog.csdn.net/ZZ2858563799/article/details/116118081)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [【Hutool】Hutool工具类之String工具——StrUtil](https://blog.csdn.net/weixin_45516489/article/details/102545076)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [工作笔记!](https://blog.csdn.net/MiaoWei_/article/details/109701290)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT3_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文