For instance, I have a file with lines that look like this:
KEY1=value1
KEY2=value2
Sometimes the value part of the string also contains = characters:
KEY1=value1=thing1
KEY2=value2=thing2
In Python, if I just want the KEY=value pairs then I would do:
>>> s = "KEY1=value1=thing1"
>>> key, value = s.split("=", 1)
>>> print(key)
KEY1
>>> print(value)
value1=thing1
It doesn't appear obvious to me how to do this in Rust.