containsSubstring is a simple substring check.
(s, substr string)
| 966 | |
| 967 | // containsSubstring is a simple substring check. |
| 968 | func containsSubstring(s, substr string) bool { |
| 969 | return len(s) >= len(substr) && indexOf(s, substr) >= 0 |
| 970 | } |
| 971 | |
| 972 | func indexOf(s, substr string) int { |
| 973 | for i := 0; i <= len(s)-len(substr); i++ { |
no test coverage detected