Utility to replace whitespaces with special characters. The main purpose is to enable properly displaying of whitespaces in HTML.
This utility takes as an input a whitespace character, like " ", "\t" and replaces it with a unicode character, like "\u00A0" (Non-breaking whitespace). The replacement is handled in the following manner:
Note: This utility handles " " (consecutive spaces) and "\t" (tabs). New lines ("\n") would not be handled.
Param | Type | Default Value | Description |
---|---|---|---|
sInput | string | The input string |
Method | Description |
---|