I have the following piece of code:
string FullNote = "aaa bbb ccc";
string ExistingAdminNote = "bbb";
string[] NoteDifference = FullNote.Split(new string[] { ExistingAdminNote }, StringSplitOptions.None);
for (int ii = 0; ii < NoteDifference.Length; ii++)
Response.Write("INCREMENT: " + ii + "--" + NoteDifference[ii] +"<br>");
Which outputs this:
INCREMENT: 0--aaa
INCREMENT: 1-- ccc
But what I want it to output is this:
INCREMENT: 0--aaa
INCREMENT: 1--bbb
INCREMENT: 2-- ccc
eg to also add the bbb into the array, at the correct index.
I know I can write some code to compare the strings etc, but is there a function that can achieve this without me having to write some custom code?
Basically I want to find the changes to the original string. It does not need to be done in this way, as long as I can find the differences between the 2 strings.
PS I do not know what the delimiter will be - it could be anything