Skip to content
#

strings

Here are 1,144 public repositories matching this topic...

💪 Helper Utils For Go: int, string, array/slice, map, dump, convert/format, error, web/http, cli, OS/ENV, filesystem, system, test, time and more. Go 常用的一些工具函数,数字,字符串,数组,Map,文件,错误,时间日期,特殊处理,格式化,常用信息获取等等

  • Updated Jul 8, 2022
  • Go
ivan-pi
ivan-pi commented Apr 23, 2021

Description

A function to pad a string with zeros or another symbol to a given width could be helpful in many cases, especially together with the to_string() function for integer to string conversion.

Currently available methods to achieve this are using concatenation

width = 32
str = "hello"
padded_str = repeat('0',width-len(str)')//str

and perhaps also internal file I/O

good first issue idea easy topic: strings

Improve this page

Add a description, image, and links to the strings topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the strings topic, visit your repo's landing page and select "manage topics."

Learn more