1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 18:17:52 -05:00
v2fly/common/serial/string_list.go

16 lines
275 B
Go
Raw Normal View History

2016-01-15 09:23:12 -05:00
package serial
2016-05-23 14:23:40 -04:00
type StringTList []StringT
2016-01-15 09:23:12 -05:00
2016-05-23 14:23:40 -04:00
func NewStringTList(raw []string) *StringTList {
list := StringTList(make([]StringT, len(raw)))
2016-01-15 09:23:12 -05:00
for idx, str := range raw {
2016-05-23 14:23:40 -04:00
list[idx] = StringT(str)
2016-01-15 09:23:12 -05:00
}
return &list
}
2016-05-23 14:23:40 -04:00
func (this *StringTList) Len() int {
2016-01-15 09:23:12 -05:00
return len(*this)
}