//
pkg.gl
Category
github.com/sugky7302/my-code-toolbox
Golang
std
convert
package
0.0.0-20240618075331-b00dc440dc64
Repository:
https://github.com/sugky7302/my-code-toolbox.git
Documentation:
pkg.go.dev
Overview
Versions
1
Dependencies
2
Dependents
0
Files
21 SLOC
#
Functions
Str2Int
Str2Int 提供字串轉整數。如果轉換失敗,會回傳預設值。.
Str2Time
Str2Time 是一個解析字串為 Time 的函式。 這個函式會嘗試使用格式 f 來解析字串。 如果都失敗,則會回傳一個錯誤。 * param {string} s - 字串。 * param {string} f - 格式。 * return {time.Time} - 解析成功的時間。 * return {error} - 解析失敗的錯誤。 */.