xfmt

package
v0.0.0-...-ed9fe1d Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2018 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func PaddingLeft

func PaddingLeft(s string, l int) string
Example
s := "hello"
fmt.Println("+", PaddingLeft(s, 10), "+")
fmt.Println("+", PaddingLeft("hellohelloh", 10), "+")
Output:

+      hello +
+ hellohelloh +

func PaddingRight

func PaddingRight(s string, l int) string
Example
fmt.Println("+", PaddingRight("hello", 10), "+")
fmt.Println("+", PaddingRight("hellohelloh", 10), "+")
Output:

+ hello      +
+ hellohelloh +

Types

This section is empty.

Jump to

Keyboard shortcuts

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