I have this code:
if (TextParsingConfiguration.join == true)
{
images = images.Trim(' ');
}
if (TextParsingConfiguration.removecommas == true)
{
images = ReplacingChars(images, new[] { ',', '"' }, " ");
}
join and removecommas are bool variables im using them also in form1 in checkBoxes. And the ReplacingChars method:
public static string ReplacingChars(string source, char[] toReplace, string withThis)
{
return string.Join(withThis, source.Split(toReplace, StringSplitOptions.None));
}
Maybe im wrong here with the logic but i wanted to give the user two options.
- to remove all Remove commas and Quotation marks this the removecommas bool variable.
- to join meaning to remove all the whit spaces but not the commas and Quotation marks just remove/delete the white spaces so the whole text will be like a block of text.
The question if number 2 is logic at all ? And if not what other options to remove(clean) i can make ? The removecommas is working. Its removing commas and Quotation marks and leave the spaces as it was.