| 284 | } |
| 285 | |
| 286 | //------------------------------------------------------------------------------------------------------- |
| 287 | // ProcessEnvironment |
| 288 | //------------------------------------------------------------------------------------------------------- |
| 289 | |
| 290 | bool SC::ProcessEnvironment::contains(StringSpan variableName, size_t* index) const |
| 291 | { |
| 292 | for (size_t idx = 0; idx < numberOfEnvironment; ++idx) |
| 293 | { |
| 294 | StringSpan name, value; |
| 295 | SC_TRY(get(idx, name, value)); |
| 296 | if (name == variableName) |
| 297 | { |
| 298 | if (index != nullptr) |
| 299 | { |
| 300 | *index = idx; |
| 301 | } |
| 302 | return true; |
| 303 | } |
| 304 | } |
| 305 | return false; |