The initialString will have line endings normalized to use os.EOL and lines with omitLine will be removed.
Comparisons for which lines should be removed are normalizing whitespace (multiple spaces collapsed into single
spaces for the comparison). This is useful to remove instances of a hosts entry, for example.
Parameters
initialString: string
The string to normalize remove instances of omitLine from
omitLine: string
All instance of this string will be omitted from the result
Returns string
A string that has instances of the omitLine removed and all line endings changed to match the os.EOL
The
initialStringwill have line endings normalized to use os.EOL and lines withomitLinewill be removed. Comparisons for which lines should be removed are normalizing whitespace (multiple spaces collapsed into single spaces for the comparison). This is useful to remove instances of a hosts entry, for example.