gitlab.com/evatix-go/core@v1.3.55/coredata/corerange/RangeAny.go (about) 1 package corerange 2 3 import "gitlab.com/evatix-go/core/internal/strutilinternal" 4 5 type RangeAny struct { 6 *BaseRange 7 RawInput interface{} 8 Start, End interface{} 9 } 10 11 func (r *RangeAny) RawInputString() string { 12 return strutilinternal.AnyToString(r.RawInput) 13 } 14 15 func (r *RangeAny) StartString() string { 16 return strutilinternal.AnyToString(r.Start) 17 } 18 19 func (r *RangeAny) EndString() string { 20 return strutilinternal.AnyToString(r.End) 21 } 22 23 func (r *RangeAny) CreateRangeInt() *RangeInt { 24 return NewRangeInt( 25 r.RawInputString(), 26 r.Separator, 27 nil) 28 } 29 30 func (r *RangeAny) CreateRangeIntMinMax(minMax *MinMaxInt) *RangeInt { 31 return NewRangeInt( 32 r.RawInputString(), 33 r.Separator, 34 minMax) 35 } 36 37 func (r *RangeAny) CreateRangeString() *RangeString { 38 return &RangeString{ 39 StartEndString: r.CreateStartEndString(), 40 } 41 } 42 43 func (r *RangeAny) CreateStartEndString() *StartEndString { 44 return &StartEndString{ 45 BaseRange: r.BaseRangeClone(), 46 Start: r.StartString(), 47 End: r.EndString(), 48 } 49 } 50 51 func (r *RangeAny) String() string { 52 return r.BaseRange.String(r.Start, r.End) 53 }