utils

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertStrToInt

func ConvertStrToInt(s string) int

ConvertStrToInt takes a string as input and converts it to an integer. If the string cannot be converted to an integer, the function returns 0. The function uses the Atoi function from the strconv package for conversion.

Parameters:

s: a string value that should be converted to integer

Returns:

an integer representing the string input, or 0 if conversion is not possible

Types

This section is empty.

Jump to

Keyboard shortcuts

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