Both names and values can have spaces I'm afraid, so you need to find the (first) instance of name and the first instance of value and then take whatever string is between them as the name, and whatever string is after value as the value.
(Deleting leading and trailing whitespace from them, ofc.)
And I suppose one needs to worry about names that actually contain the string "value" and so need to check there's whitespace on both sides of value, yeah UCI has some questionable parts....
About this: https://github.com/dje-dev/Ceres/blob/5c2e541f90a3464d2e5f95c3cf15a10bff7f1a98/src/Ceres.Features/UCI/UCIManager.SetOption.cs#L123
Both names and values can have spaces I'm afraid, so you need to find the (first) instance of
name
and the first instance ofvalue
and then take whatever string is between them as the name, and whatever string is aftervalue
as the value.(Deleting leading and trailing whitespace from them, ofc.)
And I suppose one needs to worry about names that actually contain the string "value" and so need to check there's whitespace on both sides of
value
, yeah UCI has some questionable parts....