Documentation
¶
Index ¶
- func AllElemLengthSlices(slices ...*[]string) int
- func AllElemLengthSlicesPtr(slices *[]*[]string) int
- func AnyItemsCloneIf(isClone bool, additionalCap int, slice []interface{}) (newSlice []interface{})
- func AnyItemsCloneUsingCap(newAdditionalCap int, slice []interface{}) []interface{}
- func AnyLinesAsyncProcess(lines interface{}, ...) []string
- func AppendAnyItemsWithStrings(isClone, isSkipOnEmpty bool, mainSlice []string, appendingItems ...interface{}) []string
- func AppendLineNew(slice []string, line string) []string
- func AppendStringsWithAnyItems(isClone, isSkipOnEmpty bool, mainSlice []interface{}, appendingItems ...string) []interface{}
- func AppendStringsWithMainSlice(isSkipEmpty bool, mainSlice []string, appendingItems ...string) []string
- func Clone(slice []string) (newSlice []string)
- func CloneIf(isClone bool, additionalCap int, slice []string) (newSlice []string)
- func ClonePtr(slice *[]string) (slicePtr *[]string)
- func CloneSimpleSliceToPointers(slice []string) (slicePtr *[]string)
- func CloneUsingCap(newAdditionalCap int, slice []string) []string
- func Empty() []string
- func EmptyPtr() *[]string
- func ExpandByFunc(slice *[]string, expandFunc func(line string) *[]string) *[]string
- func ExpandBySplit(slice *[]string, splitter string) *[]string
- func ExpandBySplitsPtr(slice *[]string, splitters ...string) *[]string
- func First(slice []string) string
- func FirstLastDefault(slice []string) (first, last string)
- func FirstLastDefaultPtr(slice *[]string) (first, last string)
- func FirstOrDefault(slice []string) string
- func FirstOrDefaultPtr(slice *[]string) string
- func FirstOrDefaultWith(slice []string, def string) (result string, isSuccess bool)
- func FirstPtr(slice *[]string) string
- func HasAnyItem(slice []string) bool
- func HasAnyItemPtr(slice *[]string) bool
- func InPlaceReverse(list *[]string) *[]string
- func IndexAt(slice []string, index int) string
- func IndexesDefault(slice []string, indexes ...int) (values []string)
- func IsEmpty(slice []string) bool
- func IsEmptyPtr(slice *[]string) bool
- func Last(slice []string) string
- func LastIndexPtr(slice *[]string) int
- func LastOrDefault(slice []string) string
- func LastOrDefaultPtr(slice *[]string) string
- func LastPtr(slice *[]string) string
- func LastSafeIndexPtr(slice *[]string) int
- func LengthOfPointer(slices *[]string) int
- func LinesAsyncProcess(lines []string, lineProcessor func(index int, lineIn string) (lineOut string)) []string
- func LinesProcess(lines []string, ...) []string
- func LinesSimpleProcess(splitsLines []string, lineProcessor func(lineIn string) (lineOut string)) []string
- func LinesSimpleProcessNoEmpty(splitsLines []string, lineProcessor func(lineIn string) (lineOut string)) []string
- func Make(length, capacity int) []string
- func MakeDefault(capacity int) []string
- func MakeDefaultPtr(capacity int) *[]string
- func MakeLen(length int) []string
- func MakeLenPtr(length int) *[]string
- func MakePtr(length, capacity int) *[]string
- func MergeNew(firstSlice []string, additionalItems ...string) *[]string
- func MergeNewPointers(slices ...*[]string) *[]string
- func MergeNewSimple(simpleSlices ...[]string) []string
- func MergeNewSlicesPtrOfSlices(slices ...*[]string) *[]string
- func MergeNewSlicesPtrOfSlicesPtr(slices *[]*[]string) *[]string
- func NonEmptyIf(isNonEmpty bool, slice []string) []string
- func NonEmptyJoin(slice []string, joiner string) string
- func NonEmptyJoinPtr(slice *[]string, joiner string) string
- func NonEmptySlice(slice []string) []string
- func NonEmptySlicePtr(slice *[]string) *[]string
- func NonEmptyStrings(slice []string) []string
- func NonNullStrings(slice []string) []string
- func NonWhitespaceJoin(slice []string, joiner string) string
- func NonWhitespaceJoinPtr(slice *[]string, joiner string) string
- func NonWhitespaceSlice(slice []string) []string
- func NonWhitespaceSlicePtr(slice *[]string) *[]string
- func NonWhitespaceTrimSlice(slice []string) []string
- func NonWhitespaceTrimSliceIf(isNonWhitespaceTrim bool, slice []string) []string
- func NonWhitespaceTrimSlicePtr(slice *[]string) *[]string
- func PrependLineNew(line string, slice []string) []string
- func PrependNew(secondSlice []string, prependingItems ...string) *[]string
- func ProcessAsync(processor func(index int, item interface{}) string, items ...interface{}) []string
- func ProcessOptionAsync(isSkipOnNil bool, processor func(index int, item interface{}) string, ...) []string
- func RegexTrimmedSplitNonEmptyAll(regexp *regexp.Regexp, content string) []string
- func SafeIndexAt(slice []string, index int) string
- func SafeIndexAtUsingLastIndex(slice []string, lastIndex, index int) string
- func SafeIndexAtUsingLastIndexPtr(slice *[]string, lastIndex, index int) string
- func SafeIndexAtWith(slice []string, index int, defaultVal string) string
- func SafeIndexAtWithPtr(slice *[]string, index int, defaultVal string) string
- func SafeIndexRanges(slice []string, startIndexIncluding, endIndexIncluding int) []string
- func SafeIndexes(slice []string, indexes ...int) []string
- func SafeIndexesPtr(slice *[]string, indexes ...int) (values *[]string)
- func SafeRangeItems(slice []string, start, end int) []string
- func SafeRangeItemsPtr(slice *[]string, start, end int) *[]string
- func SlicePtr(slice []string) (slicePtr *[]string)
- func SortIf(isSort bool, slice []string) []string
- func SplitContentsByWhitespace(input string) []string
- func SplitTrimmedNonEmpty(content, splitter string, number int) []string
- func SplitTrimmedNonEmptyAll(content, splitter string) []string
- type FirstLastStatus
- type IndexValuesDetail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllElemLengthSlices ¶
func AllElemLengthSlicesPtr ¶
func AnyItemsCloneIf ¶ added in v0.8.3
func AnyItemsCloneUsingCap ¶ added in v0.8.3
func AnyItemsCloneUsingCap( newAdditionalCap int, slice []interface{}, ) []interface{}
func AnyLinesAsyncProcess ¶ added in v0.6.3
func AppendAnyItemsWithStrings ¶ added in v0.8.3
func AppendLineNew ¶ added in v0.6.2
func AppendStringsWithAnyItems ¶ added in v0.8.3
func AppendStringsWithMainSlice ¶ added in v0.8.3
func Clone ¶ added in v0.5.2
Clone on nil or empty makes new &[]string{} else makes a copy of itself
func ClonePtr ¶ added in v0.5.2
ClonePtr on nil or empty makes new &[]string{} else makes a copy of itself
func CloneSimpleSliceToPointers ¶ added in v0.5.2
CloneSimpleSliceToPointers on nil or empty makes new &[]string{} else makes a copy of itself
func CloneUsingCap ¶ added in v0.8.3
func ExpandByFunc ¶
ExpandByFunc Don't include nil or empty slice from expand
func ExpandBySplit ¶
ExpandBySplit Take each slice item, split and add to the new slice array and returns it.
func ExpandBySplitsPtr ¶
ExpandBySplitsPtr Take each slice item, split and add to the new slice array and returns it.
func FirstLastDefault ¶ added in v0.5.1
func FirstLastDefaultPtr ¶ added in v0.5.1
func FirstOrDefault ¶ added in v0.5.1
func FirstOrDefaultPtr ¶ added in v0.5.1
func FirstOrDefaultWith ¶ added in v0.5.1
func HasAnyItem ¶ added in v0.5.1
func HasAnyItemPtr ¶ added in v0.5.1
func InPlaceReverse ¶
func IndexesDefault ¶ added in v0.5.1
func IsEmptyPtr ¶ added in v0.5.1
func LastIndexPtr ¶ added in v0.5.1
func LastOrDefault ¶ added in v0.5.1
func LastOrDefaultPtr ¶ added in v0.5.1
func LastSafeIndexPtr ¶ added in v0.5.1
func LengthOfPointer ¶
func LinesAsyncProcess ¶ added in v0.6.3
func LinesProcess ¶ added in v0.5.2
func LinesProcess( lines []string, lineProcessor func(index int, lineIn string) (lineOut string, isTake, isBreak bool), ) []string
LinesProcess split text using constants.NewLineUnix then returns lines processed by lineProcessor
func LinesSimpleProcess ¶ added in v0.5.2
func LinesSimpleProcess( splitsLines []string, lineProcessor func(lineIn string) (lineOut string), ) []string
LinesSimpleProcess split text using constants.NewLineUnix then returns lines processed by lineProcessor
func LinesSimpleProcessNoEmpty ¶ added in v0.5.2
func LinesSimpleProcessNoEmpty( splitsLines []string, lineProcessor func(lineIn string) (lineOut string), ) []string
LinesSimpleProcessNoEmpty split text using constants.NewLineUnix then returns lines processed by lineProcessor and don't take any empty string in the output. Empty string lineOut will be discarded from the final outputs.
func MakeDefault ¶
func MakeDefaultPtr ¶ added in v0.5.3
func MakeLenPtr ¶ added in v0.6.4
func MergeNewPointers ¶
func MergeNewSimple ¶
func MergeNewSlicesPtrOfSlices ¶
MergeNewSlicesPtrOfSlices Don't include nil or length 0 slices
func MergeNewSlicesPtrOfSlicesPtr ¶
MergeNewSlicesPtrOfSlicesPtr Don't include nil or length 0 slices
func NonEmptyIf ¶ added in v0.7.1
func NonEmptyJoin ¶
func NonEmptyJoinPtr ¶ added in v0.8.3
func NonEmptySlice ¶
func NonEmptySlicePtr ¶
func NonEmptyStrings ¶ added in v0.8.3
func NonNullStrings ¶ added in v0.7.1
func NonWhitespaceJoin ¶
func NonWhitespaceJoinPtr ¶ added in v0.5.3
func NonWhitespaceSlice ¶ added in v0.5.2
func NonWhitespaceSlicePtr ¶
func NonWhitespaceTrimSlice ¶ added in v0.5.2
func NonWhitespaceTrimSliceIf ¶ added in v0.7.1
func NonWhitespaceTrimSlicePtr ¶ added in v0.5.2
func PrependLineNew ¶ added in v0.6.2
func PrependNew ¶ added in v0.4.6
func ProcessAsync ¶ added in v0.8.3
func ProcessOptionAsync ¶ added in v0.8.3
func RegexTrimmedSplitNonEmptyAll ¶ added in v0.6.5
func SafeIndexAt ¶ added in v0.5.1
func SafeIndexAtUsingLastIndex ¶ added in v0.5.2
func SafeIndexAtUsingLastIndexPtr ¶ added in v0.5.2
func SafeIndexAtWith ¶ added in v0.5.1
func SafeIndexAtWithPtr ¶ added in v0.5.1
func SafeIndexRanges ¶ added in v0.6.4
SafeIndexRanges get safe index range values If index range is out of range or not found then empty string will be added to response
Reference Example : https://play.golang.org/p/GifVBDSqTJ2
func SafeIndexes ¶ added in v0.6.4
SafeIndexes get safe indexes slice based on indexes given
Reference : https://play.golang.org/p/uKLpK8go0lh
func SafeIndexesPtr ¶ added in v0.6.6
SafeIndexesPtr Only indexes which are present values will be included.
Warning : Not found indexes will not be included in the values.
func SafeRangeItems ¶ added in v0.5.2
func SafeRangeItemsPtr ¶ added in v0.5.2
func SlicePtr ¶ added in v0.5.2
SlicePtr on nil or empty makes new &[]string{} else makes a pointer to self and returns
func SplitContentsByWhitespace ¶ added in v0.7.1
func SplitTrimmedNonEmpty ¶ added in v0.6.5
SplitTrimmedNonEmpty
The count determines the number of substrings to return:
n > 0: at most n substrings; the last substring will be the unsplit remainder. n == 0: the result is nil (zero substrings) n < 0: all substrings
func SplitTrimmedNonEmptyAll ¶ added in v0.6.5
Types ¶
type FirstLastStatus ¶ added in v0.5.1
func FirstLastDefaultStatus ¶ added in v0.5.1
func FirstLastDefaultStatus(slice []string) *FirstLastStatus
func FirstLastDefaultStatusPtr ¶ added in v0.5.1
func FirstLastDefaultStatusPtr(slice *[]string) *FirstLastStatus
func InvalidFirstLastStatus ¶ added in v0.5.1
func InvalidFirstLastStatus() *FirstLastStatus
func InvalidFirstLastStatusForLast ¶ added in v0.5.1
func InvalidFirstLastStatusForLast(first string) *FirstLastStatus
type IndexValuesDetail ¶ added in v0.5.1
type IndexValuesDetail struct { Values []string MissingIndexes []int IsAnyMissing bool IsValid bool // represent all missing or not found any }
func InvalidIndexValuesDetail ¶ added in v0.5.1
func InvalidIndexValuesDetail() *IndexValuesDetail
func SafeIndexesDefaultWithDetail ¶ added in v0.5.1
func SafeIndexesDefaultWithDetail( slice []string, indexes ...int, ) *IndexValuesDetail
SafeIndexesDefaultWithDetail Only indexes which are present values will be included.
Warning : Not found indexes will not be included in the values.
Source Files
¶
- AllElemLengthSlices.go
- AllElemLengthSlicesPtr.go
- AnyItemsCloneIf.go
- AnyItemsCloneUsingCap.go
- AnyLinesAsyncProcess.go
- AppendAnyItemsWithStrings.go
- AppendLineNew.go
- AppendStringsWithAnyItems.go
- AppendStringsWithMainSlice.go
- Clone.go
- CloneIf.go
- ClonePtr.go
- CloneSimpleSliceToPointers.go
- CloneUsingCap.go
- Empty.go
- EmptyPtr.go
- ExpandByFunc.go
- ExpandBySplit.go
- ExpandBySplitsPtr.go
- First.go
- FirstLastDefault.go
- FirstLastDefaultPtr.go
- FirstLastDefaultStatus.go
- FirstLastDefaultStatusPtr.go
- FirstLastStatus.go
- FirstOrDefault.go
- FirstOrDefaultPtr.go
- FirstOrDefaultWith.go
- FirstPtr.go
- HasAnyItem.go
- HasAnyItemPtr.go
- InPlaceReverse.go
- IndexAt.go
- IndexValuesDetail.go
- IndexesDefault.go
- IsEmpty.go
- IsEmptyPtr.go
- Last.go
- LastIndexPtr.go
- LastOrDefault.go
- LastOrDefaultPtr.go
- LastPtr.go
- LastSafeIndexPtr.go
- LengthOfPointer.go
- LinesAsyncProcess.go
- LinesProcess.go
- LinesSimpleProcess.go
- LinesSimpleProcessNoEmpty.go
- Make.go
- MakeDefault.go
- MakeDefaultPtr.go
- MakeLen.go
- MakeLenPtr.go
- MakePtr.go
- MergeNew.go
- MergeNewPointers.go
- MergeNewSimple.go
- MergeNewSlicesPtrOfSlices.go
- MergeNewSlicesPtrOfSlicesPtr.go
- NonEmpty.go
- NonEmptyIf.go
- NonEmptyJoin.go
- NonEmptyJoinPtr.go
- NonEmptySlicePtr.go
- NonEmptyStrings.go
- NonNullStrings.go
- NonWhitespaceJoin.go
- NonWhitespaceJoinPtr.go
- NonWhitespaceSlice.go
- NonWhitespaceSlicePtr.go
- NonWhitespaceTrimSlice.go
- NonWhitespaceTrimSliceIf.go
- NonWhitespaceTrimSlicePtr.go
- PrependLineNew.go
- PrependNew.go
- ProcessAsync.go
- ProcessOptionAsync.go
- RegexTrimmedSplitNonEmptyAll.go
- SafeIndexAt.go
- SafeIndexAtUsingLastIndex.go
- SafeIndexAtUsingLastIndexPtr.go
- SafeIndexAtWith.go
- SafeIndexAtWithPtr.go
- SafeIndexRanges.go
- SafeIndexes.go
- SafeIndexesDefaultPtr.go
- SafeIndexesDefaultWithDetail.go
- SafeRangeItems.go
- SafeRangeItemsPtr.go
- SlicePtr.go
- SortIf.go
- SplitContentsByWhitespace.go
- SplitTrimmedNonEmpty.go
- SplitTrimmedNonEmptyAll.go