package
0.2.2
Repository: https://github.com/sugarme/tokenizer.git
Documentation: pkg.go.dev

# Functions

BatchInt slits a slice to batches (slice of slices).
BatchStr slits a slice to batches (slice of slices).
Contain checks whether a element is in a slice (same type).
CopyInt copy a string slice to another.
CopyStr copy a string slice to another.
CutInt removes a sub-slice from start(inclusive in removed slice) to end (exclusive in remve slice) from original slice.
CutStr removes a sub-slice from start(inclusive in removed slice) to end (exclusive in remve slice) from original slice.
DeduplicateInt de-duplicates a slice in place.
DeduplicateStr de-duplicates a slice in place.
DeleteInt deletes an string item at specified index and preserves order.
DeleteStr deletes an string item at specified index and preserves order.
ExpandInt expands capacity of slice from `start` (inclusive) to `end` exclusive point.
ExpandStr expands capacity of slice from `start` (inclusive) to `end` exclusive point.
ExtendInt extends slice capacity by adding a spcified size at then end of slice.
ExtendStr extends slice capacity by adding a spcified size at then end of slice.
FilterInt filters in place a int slice.
FilterStrNoAllocate filters a slice without allocating.
FilterStr filters in place a string slice.
FilterStrNoAllocate filters a slice without allocating.
InsertInt inserts an int to slice of int at specified index i.
InsertStr inserts an string to slice of string at specified index i.
InsertVecInt inserts a slice (`b`) to origin slice (`a`) at specified index point.
InsertVecStr inserts a slice (`b`) to origin slice (`a`) at specified index point.
PopFrontInt pops the first item from the slice (shift).
PopFrontStr pops the first item from the slice (shift).
PopInt pops last item out of a give slice.
PopStr pops last item out of a give slice.
PushFrontInt pushes an item to the front of a slice (unshift).
PushFrontStr pushes an item to the front of a slice (unshift).
PushInt pushes an item to a slice at the end of it.
PushStr pushes an item to a slice at the end of it.
Reverse reverses any slice Source: https://stackoverflow.com/questions/28058278.
ReverseInt replaces the contents of a slice with the same elements but in reverse order.
ReverseLRInt does the same as ReverseInt except with 2 indices.
ReverseLRStr does the same as ReverseStr except with 2 indices.
ReverseStr replaces the contents of a slice with the same elements but in reverse order.
ShuffleInt shuffles a slice using Fisher–Yates algorithm Since go1.10, this is available at math/rand.Shuffle (https://godoc.org/math/rand#Shuffle).
ShuffleStr shuffles a slice using Fisher–Yates algorithm Since go1.10, this is available at math/rand.Shuffle (https://godoc.org/math/rand#Shuffle).