Given the input ~Zw~~"iE^L I should get !w~"iE^L instead I am getting Zw~"iE^L
So it catch the ~~ just fine and replace it with ~ but I want to replace ~Z with !
Any ideas?
for (j = 0; j < dataCharCount; j++, k++)
{
if (inputData[j] == '~' && inputData[j + 1] == '~')
{
filteredInputData[k] = '~';
j++;
}
else if (inputData[j] == '~' && inputData[j + 1] == 'Z')
{
filteredInputData[k] = '!';
j++;
}
filteredInputData[k] = inputData[j];
}