stringjuice

package
v1.19.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Description: This package provides utility functions for string manipulation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertToType

func ConvertToType(value string) (interface{}, error)

ConvertToType converts string value to the appropriate type.

It tries to convert to primitive.ObjectID, bool, int, float, time.Time, and if none of these succeed, it defaults to string.

func ParseBool added in v1.17.2

func ParseBool(str string) (bool, error)

ParseBool parses a string value to a boolean.

It returns an error if the string value cannot be parsed to a boolean.

Types

This section is empty.

Jump to

Keyboard shortcuts

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