forked from pneymrl2f/nightingale
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
335 B
25 lines
335 B
package istr
|
|
|
|
import (
|
|
"strconv"
|
|
"strings"
|
|
)
|
|
|
|
func SampleKeyInvalid(str string) bool {
|
|
idx := strings.IndexFunc(str, func(r rune) bool {
|
|
return r == '\t' ||
|
|
r == '\r' ||
|
|
r == '\n' ||
|
|
r == ',' ||
|
|
r == ' ' ||
|
|
r == '='
|
|
})
|
|
|
|
if idx != -1 {
|
|
return true
|
|
}
|
|
|
|
_, err := strconv.ParseFloat(str, 64)
|
|
return err == nil
|
|
}
|