| 154 | } |
| 155 | |
| 156 | int builtin_string_find1 ( const char *str, const char *substr, int start, Context * context ) { |
| 157 | if (!str || !substr || !*str || !*substr) |
| 158 | return -1; |
| 159 | const uint32_t strLen = stringLengthSafe ( *context, str ); |
| 160 | if (!strLen) |
| 161 | return -1; |
| 162 | const char *ret = strstr(&str[clamp_int(start, 0, strLen)], substr); |
| 163 | return ret ? int(ret-str) : -1; |
| 164 | } |
| 165 | |
| 166 | int builtin_string_find2 (const char *str, const char *substr) { |
| 167 | if (!str || !substr || !*str || !*substr) |
nothing calls this directly
no test coverage detected