Golang 格式输出符号

栏目: Go · 发布时间: 5年前

%d int变量

%x, %o, %b 分别为16进制,8进制,2进制形式的int

%f, %g, %e 浮点数: 3.141593 3.141592653589793 3.141593e+00

%t 布尔变量:true 或 false

%c rune (Unicode码点),Go语言里特有的Unicode字符类型

%s string

%q 带双引号的字符串 "abc" 或 带单引号的 rune 'c'

%v 会将任意变量以易读的形式打印出来

%T 打印变量的类型

%% 字符型百分比标志(%符号本身,没有其他操作)


以上所述就是小编给大家介绍的《Golang 格式输出符号》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

The Haskell School of Music

The Haskell School of Music

Paul Hudak、Donya Quick / Cambridge University Press / 2018-10-4 / GBP 42.99

This book teaches functional programming through creative applications in music and sound synthesis. Readers will learn the Haskell programming language and explore numerous ways to create music and d......一起来看看 《The Haskell School of Music》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

URL 编码/解码
URL 编码/解码

URL 编码/解码

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具