misc

package
v0.0.0-...-5c98b36 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2022 License: MulanPSL-2.0 Imports: 2 Imported by: 0

README

misc 杂七杂八的函数

函数名 描述
Hex2Int 16进制字符串转整数

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hex2Int

func Hex2Int(s string) (n int, ok bool)

Hex2Int 十六进制字符串转换为整数。 hexadecimal string to integer.

func IfThen

func IfThen[T any](cond bool, trueVal T, falseVal T) T

IfThen 当 cond 返回 true,则返回 trueVal,或者返回 flaseVal 使用它可以替代 三元操作符号 (ternary conditional operator)

Types

This section is empty.

Jump to

Keyboard shortcuts

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