M
Mark Rogers
Happy New Year y'all,
It's my day to be stumped. I'm trying to extract an Intersect between
two strings where the letters stay in the same order as the original
strings.
For example: string 1) "Happy new year" and string 2) "new year rocks!"
The result I want is: " new year "
IEnumerable provides the correct characters, but the results are not in
order of the original strings.
CompareOrdinal (probably the wrong use) works where I can get the start
and end of each string, except when the strings begin or end has the
same position. For example: "MyString" and "MyStrings" results in some
weird number. I probably don't understand the method correctly. If the
start position and end positions aren't equal, it works fine. Like
"String works" and "MyString work" can generate "String work"
So, with that said I need to compare "Happy new year" and string 2) "new
year rocks!" and get the result: " new year "
I'm long winded, but I hope the problem is clear.
-- Mark
It's my day to be stumped. I'm trying to extract an Intersect between
two strings where the letters stay in the same order as the original
strings.
For example: string 1) "Happy new year" and string 2) "new year rocks!"
The result I want is: " new year "
IEnumerable provides the correct characters, but the results are not in
order of the original strings.
CompareOrdinal (probably the wrong use) works where I can get the start
and end of each string, except when the strings begin or end has the
same position. For example: "MyString" and "MyStrings" results in some
weird number. I probably don't understand the method correctly. If the
start position and end positions aren't equal, it works fine. Like
"String works" and "MyString work" can generate "String work"
So, with that said I need to compare "Happy new year" and string 2) "new
year rocks!" and get the result: " new year "
I'm long winded, but I hope the problem is clear.
-- Mark