Documentation ¶
Index ¶
- Constants
- func At[T Stringlike](value T, delimiter byte, index int) string
- func First[T Stringlike](value T, delimiter byte) string
- func Head[T Stringlike](value T, delimiter byte) string
- func Index[T Stringlike](value T, delimiter byte) int
- func IsEmpty[T Stringlike](value T) bool
- func IsEmptyTail[T Stringlike](value T, delimiter byte) bool
- func Last[T Stringlike](value T, delimiter byte) string
- func LastIndex[T Stringlike](value T, delimiter byte) int
- func PushHead[T Stringlike](value T, headValue string, delimiter byte) T
- func PushTail[T Stringlike](value T, tailValue string, delimiter byte) T
- func RemoveLast[T Stringlike](value T, delimiter byte) T
- func Split[T Stringlike](value T, delimiter byte) (string, T)
- func SplitTail[T Stringlike](value T, delimiter byte) (T, string)
- func Tail[T Stringlike](value T, delimiter byte) T
- type Comma
- func (list Comma) At(index int) string
- func (list Comma) Bytes() []byte
- func (list Comma) First() string
- func (list Comma) Head() string
- func (list Comma) IsEmpty() bool
- func (list Comma) IsEmptyTail() bool
- func (list Comma) Last() string
- func (list Comma) PushHead(value string) List
- func (list Comma) PushTail(value string) List
- func (list Comma) RemoveLast() List
- func (list Comma) Split() (string, List)
- func (list Comma) SplitTail() (List, string)
- func (list Comma) String() string
- func (list Comma) Tail() List
- type Dot
- func (list Dot) At(index int) string
- func (list Dot) Bytes() []byte
- func (list Dot) First() string
- func (list Dot) Head() string
- func (list Dot) IsEmpty() bool
- func (list Dot) IsEmptyTail() bool
- func (list Dot) Last() string
- func (list Dot) PushHead(value string) List
- func (list Dot) PushTail(value string) List
- func (list Dot) RemoveLast() List
- func (list Dot) Split() (string, List)
- func (list Dot) SplitTail() (List, string)
- func (list Dot) String() string
- func (list Dot) Tail() List
- type Equal
- func (list Equal) At(index int) string
- func (list Equal) Bytes() []byte
- func (list Equal) First() string
- func (list Equal) Head() string
- func (list Equal) IsEmpty() bool
- func (list Equal) IsEmptyTail() bool
- func (list Equal) Last() string
- func (list Equal) PushHead(value string) List
- func (list Equal) PushTail(value string) List
- func (list Equal) RemoveLast() List
- func (list Equal) Split() (string, List)
- func (list Equal) SplitTail() (List, string)
- func (list Equal) String() string
- func (list Equal) Tail() List
- type List
- type Semicolon
- func (list Semicolon) At(index int) string
- func (list Semicolon) Bytes() []byte
- func (list Semicolon) First() string
- func (list Semicolon) Head() string
- func (list Semicolon) IsEmpty() bool
- func (list Semicolon) IsEmptyTail() bool
- func (list Semicolon) Last() string
- func (list Semicolon) PushHead(value string) List
- func (list Semicolon) PushTail(value string) List
- func (list Semicolon) RemoveLast() List
- func (list Semicolon) Split() (string, List)
- func (list Semicolon) SplitTail() (List, string)
- func (list Semicolon) String() string
- func (list Semicolon) Tail() List
- type Slash
- func (list Slash) At(index int) string
- func (list Slash) Bytes() []byte
- func (list Slash) First() string
- func (list Slash) Head() string
- func (list Slash) IsEmpty() bool
- func (list Slash) IsEmptyTail() bool
- func (list Slash) Last() string
- func (list Slash) PushHead(value string) List
- func (list Slash) PushTail(value string) List
- func (list Slash) RemoveLast() List
- func (list Slash) Split() (string, List)
- func (list Slash) SplitTail() (List, string)
- func (list Slash) String() string
- func (list Slash) Tail() List
- type Space
- func (list Space) At(index int) string
- func (list Space) Bytes() []byte
- func (list Space) First() string
- func (list Space) Head() string
- func (list Space) IsEmpty() bool
- func (list Space) IsEmptyTail() bool
- func (list Space) Last() string
- func (list Space) PushHead(value string) List
- func (list Space) PushTail(value string) List
- func (list Space) RemoveLast() List
- func (list Space) Split() (string, List)
- func (list Space) SplitTail() (List, string)
- func (list Space) String() string
- func (list Space) Tail() List
- type Stringlike
Constants ¶
const DelimiterComma = ','
const DelimiterDot = '.'
const DelimiterEqual = '='
const DelimiterSemicolon = ';'
const DelimiterSlash = '/'
const DelimiterSpace = ' '
Variables ¶
This section is empty.
Functions ¶
func At ¶
func At[T Stringlike](value T, delimiter byte, index int) string
at returns the list vaue at a particular index
func First ¶ added in v0.7.0
func First[T Stringlike](value T, delimiter byte) string
First returns the FIRST item in a list (alias for Head)
func Head ¶
func Head[T Stringlike](value T, delimiter byte) string
Head returns the FIRST item in a list
func Index ¶ added in v0.3.0
func Index[T Stringlike](value T, delimiter byte) int
Index finds the first occurrence of the delimiter (-1 if not found)
func IsEmpty ¶ added in v0.3.0
func IsEmpty[T Stringlike](value T) bool
IsEmpty returns TRUE if the list is empty.
func IsEmptyTail ¶ added in v0.3.0
func IsEmptyTail[T Stringlike](value T, delimiter byte) bool
IsEmptyTail returns TRUE if this list only has one element
func Last ¶
func Last[T Stringlike](value T, delimiter byte) string
Last returns the LAST item in a T-based-list
func LastIndex ¶ added in v0.3.0
func LastIndex[T Stringlike](value T, delimiter byte) int
LastIndex finds the last occurrence of the delimiter (-1 if not found)
func PushHead ¶
func PushHead[T Stringlike](value T, headValue string, delimiter byte) T
PushHead adds a new item to the beginning of the list
func PushTail ¶
func PushTail[T Stringlike](value T, tailValue string, delimiter byte) T
PushTail adds a new item to the end of the list
func RemoveLast ¶
func RemoveLast[T Stringlike](value T, delimiter byte) T
RemoveLast returns the full list, with the last element removed.
func Split ¶
func Split[T Stringlike](value T, delimiter byte) (string, T)
Split returns the FIRST element, and the REST element in one function call
func SplitTail ¶
func SplitTail[T Stringlike](value T, delimiter byte) (T, string)
SplitTail behaves like split, but splits the beginning of the list from the last item in the list. So, the list "a,b,c" => "a,b", "c"
func Tail ¶
func Tail[T Stringlike](value T, delimiter byte) T
Tail returns any values in the list AFTER the first item
Types ¶
type Comma ¶ added in v0.3.0
type Comma string
func (Comma) IsEmptyTail ¶ added in v0.3.0
func (Comma) RemoveLast ¶ added in v0.3.0
type Dot ¶ added in v0.3.0
type Dot string
func (Dot) IsEmptyTail ¶ added in v0.3.0
func (Dot) RemoveLast ¶ added in v0.3.0
type Equal ¶ added in v0.3.0
type Equal string
func (Equal) IsEmptyTail ¶ added in v0.3.0
func (Equal) RemoveLast ¶ added in v0.3.0
type List ¶ added in v0.6.0
type List interface { IsEmpty() bool IsEmptyTail() bool Head() string Tail() List First() string Last() string RemoveLast() List Split() (string, List) SplitTail() (List, string) At(index int) string PushHead(value string) List PushTail(value string) List String() string Bytes() []byte }
List interface wraps all of the list manipulation methods implemented by standard lists in this library.
func BySemicolon ¶ added in v0.7.0
type Semicolon ¶ added in v0.7.0
type Semicolon string
func (Semicolon) IsEmptyTail ¶ added in v0.7.0
func (Semicolon) RemoveLast ¶ added in v0.7.0
type Slash ¶ added in v0.3.0
type Slash string
func (Slash) IsEmptyTail ¶ added in v0.3.0
func (Slash) RemoveLast ¶ added in v0.3.0
type Space ¶ added in v0.3.0
type Space string