IsSpaces checks if a given string is only spaces
(str []byte)
| 320 | |
| 321 | // IsSpaces checks if a given string is only spaces |
| 322 | func IsSpaces(str []byte) bool { |
| 323 | for _, c := range str { |
| 324 | if c != ' ' { |
| 325 | return false |
| 326 | } |
| 327 | } |
| 328 | |
| 329 | return true |
| 330 | } |
| 331 | |
| 332 | // IsSpacesOrTabs checks if a given string contains only spaces and tabs |
| 333 | func IsSpacesOrTabs(str []byte) bool { |
no outgoing calls
no test coverage detected