go-tabulate:用于字符串数组的列式布局(填充以适合)

时间:2024-06-28 09:43:50
【文件属性】:

文件名称:go-tabulate:用于字符串数组的列式布局(填充以适合)

文件大小:36KB

文件格式:ZIP

更新时间:2024-06-28 09:43:50

Go

概要 用于字符串数组的列式布局(填充以适合)。 []string每个字符串都被填充以适应给定的宽度,并且将返回一个字符串。 对很有用。 例子 package main import "fmt" import "github.com/hij1nx/go-tabulate" var w = 80 // usually the calculated terminal width var a = [] string { "foo" , "barrrrrr" , "bazz" , "blaaaaa" } fmt . Println ( Tabulate ( w , a )) 截屏


【文件预览】:
go-tabulate-master
----.gitignore(17B)
----cols.png(36KB)
----main_test.go(1KB)
----LICENSE(1KB)
----main.go(928B)
----README.md(491B)

网友评论