numbers

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsStringUint

func IsStringUint(input string) bool

IsStringUint returns true if all characters in the string are integers without checking for MaxInt overflow

func SafeAdd

func SafeAdd(a, b int) (int, bool)

SafeAdd returns (a + b, true) if the sum value wouldn't overflow MaxInt. Otherwise (a, false) is returned.

func SafeAdd64

func SafeAdd64(a, b int64) (int64, bool)

SafeAdd64 returns (a + b, true) if the sum value wouldn't overflow MaxInt64. Otherwise (a, false) are returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

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