mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-01 07:26:48 +00:00
Added new function in common.
This commit is contained in:
committed by
Adrian Gallagher
parent
cd398bd35f
commit
fa041104b2
@@ -155,6 +155,17 @@ func StringDataCompare(haystack []string, needle string) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// StringDataContainsUpper checks the substring array with an input and returns
|
||||
// a bool irrespective of lower or upper case strings
|
||||
func StringDataContainsUpper(haystack []string, needle string) bool {
|
||||
for _, data := range haystack {
|
||||
if strings.Contains(StringToUpper(data), StringToUpper(needle)) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
// JoinStrings joins an array together with the required separator and returns
|
||||
// it as a string
|
||||
func JoinStrings(input []string, separator string) string {
|
||||
|
||||
Reference in New Issue
Block a user