helpers

package
v0.0.0-...-17d044f Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDigits

func AddDigits(nb int) int

Perform an addition over the digits of a 2 digits number

func AddLeadingZeros

func AddLeadingZeros(s string, desiredLength int) string

AddLeadingZeros adds leading zeros to a string to have a string of a desired length

func AddLeadingZerosToNumber

func AddLeadingZerosToNumber(nb int) string

AddLeadingZerosToNumber adds leading zeros to a number to have a string of length 6

func RemoveDashes

func RemoveDashes(s string) string

RemoveDashes removes dashes from a string

func StringSliceToIntSlice

func StringSliceToIntSlice(slice []string) (res []int)

Convert a slice of strings to a slice of integers

func StringToIntSlice

func StringToIntSlice(s string) []int

Convert a string containing multiple digits to a string of integers

func ToInt

func ToInt(s string) int

Try to transform a string to an int and panic if it fails

Types

This section is empty.

Jump to

Keyboard shortcuts

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