string

package module
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2020 License: BSD-3-Clause Imports: 10 Imported by: 1

README

String Functions

This function package exposes common string related functions.

concat()

Concatenate a set of strings.

Input Args
Arg Type Description
str string Strings to concatinate
Output
Arg Type Description
returnType string A concatinated string.

equals()

Check if two strings are equal

Input Args
Arg Type Description
str1 string String to be compared
str2 string String to be compared
Output
Arg Type Description
returnType bool True if the strings are equal, otherwise false.

equalsIgnoreCase()

Check if two strings are equal, ignoring case.

Input Args
Arg Type Description
str1 string String to be compared
str2 string String to be compared
Output
Arg Type Description
returnType bool True if the strings are equal, otherwise false.

contains()

Check if str2 is within str1.

Input Args
Arg Type Description
str1 string Source string
str2 string String to find in str1
Output
Arg Type Description
returnType bool True if the str2 is found within str1

float()

Convert str1 to a foat64.

Input Args
Arg Type Description
str1 string Source string
Output
Arg Type Description
returnType float64 The float value of str1

integer()

Convert str1 to a int.

Input Args
Arg Type Description
str1 string Source string
Output
Arg Type Description
returnType int The int value of str1

len()

Get the length of str1

Input Args
Arg Type Description
str1 string Source string
Output
Arg Type Description
returnType int The length of str1

substring()

Get a substring from str1

Input Args
Arg Type Description
str1 string Source string
start string The starting string/char
start string The ending string/char
Output
Arg Type Description
returnType string The substring

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EndsWith

type EndsWith struct {
}

func (*EndsWith) Eval

func (s *EndsWith) Eval(params ...interface{}) (interface{}, error)

func (*EndsWith) GetCategory

func (s *EndsWith) GetCategory() string

func (*EndsWith) Name

func (s *EndsWith) Name() string

func (*EndsWith) Sig

func (s *EndsWith) Sig() (paramTypes []data.Type, isVariadic bool)

type StartsWith

type StartsWith struct {
}

func (*StartsWith) Eval

func (s *StartsWith) Eval(params ...interface{}) (interface{}, error)

func (*StartsWith) GetCategory

func (s *StartsWith) GetCategory() string

func (*StartsWith) Name

func (s *StartsWith) Name() string

func (*StartsWith) Sig

func (s *StartsWith) Sig() (paramTypes []data.Type, isVariadic bool)

type Substringafter

type Substringafter struct {
}

func (*Substringafter) Eval

func (s *Substringafter) Eval(params ...interface{}) (interface{}, error)

func (*Substringafter) Name

func (s *Substringafter) Name() string

func (*Substringafter) Sig

func (s *Substringafter) Sig() (paramTypes []data.Type, isVariadic bool)

type Substringbefore

type Substringbefore struct {
}

func (*Substringbefore) Eval

func (s *Substringbefore) Eval(params ...interface{}) (interface{}, error)

func (*Substringbefore) Name

func (s *Substringbefore) Name() string

func (*Substringbefore) Sig

func (s *Substringbefore) Sig() (paramTypes []data.Type, isVariadic bool)

Jump to

Keyboard shortcuts

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