while doing PrestaShop/PrestaShop#35356 I stumbled upon this comma issue and while that pr was using older version of utils/file it had the same issue that 1) deleteComma was not properly documented 2) it is really hard to write a test case where whitespace does not matter.
I will open a pr that at least adds some documentation for the next person who is stuck with this but a better solution would be to rename the parameter to "ignoreWhiteSpaceAndNewLines" or something like that and then do that better.