function sap/base/strings/whitespaceReplacer

Visiblity: restricted
Available since: N/A
Module: sap/base/strings/whitespaceReplacer
Application Component:

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.


Parameters Overview

Param Type Default Value Description
sInput string The input string

Methods Overview

Method Description