Checking delimiters if/else statements for String and Array Studio 2

The way how I used includes for delimiters is by using if/else statements and then output which ones comma and which ones space. On the last string, I notice there is a comma and space, so do I treat it like its only a comma when checking delimiters?