format

package
v2.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package format implements various formatting functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LeftPaddingWithSize

func LeftPaddingWithSize(l int, s string, ch string) string

LeftPaddingWithSize pads the string s with enough of character ch to the length l. For example: LeftPaddingWithSize(10, "hello", "*") will produce the string "*****hello"

func PadZeroToNineWithZero

func PadZeroToNineWithZero(i int) string

PadZeroToNineWithZero pad i with '0' in front. For example: '0' => '00', '1' => '01' ... '9' => '09'

func RightPaddingWithSize

func RightPaddingWithSize(l int, s string, ch string) string

RightPaddingWithSize pads the string s with enough of character ch to the length l. For example: RightPaddingWithSize(10, "hello", "*") will produce the string "hello*****"

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL