formatter

package
v2.1.12 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2022 License: MIT Imports: 5 Imported by: 7

Documentation

Overview

Package formatter implements some functions to format string, struct.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Comma

func Comma[T constraints.Float | constraints.Integer | string](value T, symbol string) string

Comma add comma to a number value by every 3 numbers from right. ahead by symbol char. if value is invalid number string eg "aa", return empty string Comma("12345", "$") => "$12,345", Comma(12345, "$") => "$12,345"

Types

This section is empty.

Jump to

Keyboard shortcuts

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