number

package
v2.2.21 Latest Latest
Warning

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

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

Documentation

Overview

Package number provides Option-based utilities for number conversions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Atoi

func Atoi(value string) (int, bool)

Atoi converts a string to an integer, returning Some(int) on success or None on failure.

Example:

result := Atoi("42") // Some(42)
result := Atoi("abc") // None
result := Atoi("") // None

func Itoa

func Itoa(value int) (string, bool)

Itoa converts an integer to a string, always returning Some(string).

Example:

result := Itoa(42) // Some("42")
result := Itoa(-10) // Some("-10")
result := Itoa(0) // Some("0")

Types

This section is empty.

Jump to

Keyboard shortcuts

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