Lua string.format选项 [英] Lua string.format options

查看:412
本文介绍了Lua string.format选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这似乎是一个愚蠢的问题,但是string.format中用于替换字符串的符号是什么?有人可以给我指出一个简单的使用示例吗?

This may seem like a stupid question, but what are the symbols used for string replacement in string.format? can someone point me to a simple example of how to use it?

推荐答案

string.format与c中的Printf遵循相同的模式:

string.format in Lua follows the same patterns as Printf in c:

http://www.cplusplus.com/reference/clibrary/cstdio/printf /

有一些例外,请参见此处:

There are some exceptions, for those see here:

http://pgl.yoyo.org/luai/i/string.format

这篇关于Lua string.format选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆