|
@@ -51,6 +51,9 @@ func TimeStrToTime(T_time string) (time.Time, bool) {
|
|
}
|
|
}
|
|
|
|
|
|
func SplitStringIds(str string, prefix string) (r []string) {
|
|
func SplitStringIds(str string, prefix string) (r []string) {
|
|
|
|
+ if len(str) == 0 {
|
|
|
|
+ return r
|
|
|
|
+ }
|
|
Ids_str := strings.TrimRight(str, "|")
|
|
Ids_str := strings.TrimRight(str, "|")
|
|
Ids := strings.Split(Ids_str, "|")
|
|
Ids := strings.Split(Ids_str, "|")
|
|
for _, v := range Ids {
|
|
for _, v := range Ids {
|
|
@@ -60,6 +63,9 @@ func SplitStringIds(str string, prefix string) (r []string) {
|
|
}
|
|
}
|
|
|
|
|
|
func SplitStringToDotStr(str string, prefix string) (r string) {
|
|
func SplitStringToDotStr(str string, prefix string) (r string) {
|
|
|
|
+ if len(str) == 0 {
|
|
|
|
+ return r
|
|
|
|
+ }
|
|
Ids_str := strings.TrimRight(str, "|")
|
|
Ids_str := strings.TrimRight(str, "|")
|
|
Ids := strings.Split(Ids_str, "|")
|
|
Ids := strings.Split(Ids_str, "|")
|
|
for _, v := range Ids {
|
|
for _, v := range Ids {
|
|
@@ -70,6 +76,9 @@ func SplitStringToDotStr(str string, prefix string) (r string) {
|
|
}
|
|
}
|
|
|
|
|
|
func SplitStringToIntIds(str string, prefix string) (r []int) {
|
|
func SplitStringToIntIds(str string, prefix string) (r []int) {
|
|
|
|
+ if len(str) == 0 {
|
|
|
|
+ return r
|
|
|
|
+ }
|
|
Ids_str := strings.TrimRight(str, "|")
|
|
Ids_str := strings.TrimRight(str, "|")
|
|
Ids := strings.Split(Ids_str, "|")
|
|
Ids := strings.Split(Ids_str, "|")
|
|
for _, v := range Ids {
|
|
for _, v := range Ids {
|