This repository has been archived on 2022-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
|
package utils
|
|
|
|
import "strings"
|
|
|
|
func FindStringWithPrefix(sl []string, prefix string) string {
|
|
for _, s := range sl {
|
|
if strings.HasPrefix(s, prefix) {
|
|
return s
|
|
}
|
|
}
|
|
return ""
|
|
}
|