GetNoneEmpty returns the first non-empty string, return empty if all empty
(strArr ...string)
| 33 | |
| 34 | // GetNoneEmpty returns the first non-empty string, return empty if all empty |
| 35 | func GetNoneEmpty(strArr ...string) string { |
| 36 | for _, s := range strArr { |
| 37 | if len(s) > 0 { |
| 38 | return s |
| 39 | } |
| 40 | } |
| 41 | return "" |
| 42 | } |