textutil

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatAccountNumber

func FormatAccountNumber(number string) string

Left-pads an all-digit account number to five digits ("8841" -> "08841"), mirroring the dashboard's formatAccountNumber. A leading "0" or any non-digit leaves it untouched — record numbers pad to six.

func FormatRecordNumber

func FormatRecordNumber(number string) string

FormatRecordNumber left-pads the numeric first segment of a record number to six digits, mirroring the dashboard's formatRecordNumber. A first segment that begins with an ASCII letter (e.g. an "SO-" prefix) is left untouched.

Examples: "123" -> "000123", "123-45" -> "000123-45", "SO-001" -> "SO-001".

func Pluralize

func Pluralize(count int, singular, plural string) string

Pluralize returns singular when count is 1 and plural otherwise.

Types

This section is empty.

Jump to

Keyboard shortcuts

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