Documentation
¶
Index ¶
- func CanConvert(data interface{}, optionType types.OptionType) (bool, error)
- func ConvertString(value string, data any, arg string, delimiterFunc types.ListDelimiterFunc, ...) error
- func DamerauLevenshteinDistance(s1, s2 string) int
- func LevenshteinDistance(s1, s2 string) int
- func NewOfType[T any](value T) *T
- func Truncate(s string, length int) string
- func UniqueID(prefix string) string
- func UnwrapType(t reflect.Type) reflect.Type
- func UnwrapValue(v reflect.Value) (reflect.Value, error)
- type Number
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanConvert ¶
func CanConvert(data interface{}, optionType types.OptionType) (bool, error)
func ConvertString ¶
func DamerauLevenshteinDistance ¶ added in v2.4.2
DamerauLevenshteinDistance calculates the restricted Damerau-Levenshtein distance (Optimal String Alignment) between two strings. Supports insertion, deletion, substitution, and transposition of adjacent characters. This implementation is Unicode-aware and works correctly with multi-byte characters.
func LevenshteinDistance ¶ added in v2.3.0
LevenshteinDistance is a deprecated alias for DamerauLevenshteinDistance. Deprecated: Use DamerauLevenshteinDistance instead.
func UniqueID ¶ added in v2.3.0
UniqueID creates a unique identifier for parsers by combining a nanosecond timestamp with an atomic counter to ensure uniqueness
func UnwrapType ¶
UnwrapType recursively unwraps pointer.go types and returns the underlying type
Types ¶
Click to show internal directories.
Click to hide internal directories.