If all you are trying to do is to parse a comma separated string regardless of if it's quoted or not, then you don't need to create a list and append each character to it.
You can just access the index of the string and use a range to copy the substring - something like the code below.
Please note - that this isn't compilable code - just an alternative that doesn't need the List.
@tommasodotNET: Apologies for the delay in checking the PR.
hope you don't mind, but I've made a suggestion of optimization by getting the GetParts to parse both the key / values. (The commit can be rolled back if you don't like - it was just easier in VS2019 to do it this way)
Based on the code, I've assumed the input format is key=value, key=value. Is this format correct?
I've also added a test method for the function, so it can be tested outside of JF, which should help in getting the PR accepted.
I've included the following tests
the 1st param is the input string, the 2nd param the key, and the 3rd the value
Is there anymore conditions that need adding?
…ontext.cs Co-authored-by: artiume <email@example.com>