Replaces all the white space in a string with a supplied character.
<div [id]="'CHECK MY ID' | formatSpace">
BATTLESTAR GALACTICA
</div>
The pipe replaces each run of whitespace characters in the string with a single character
(which is the underscore by default) and transforms the string to lowercase (eg, test a pipe
becomes test_a_pipe
).
You can specify a different replacement character by passing it as a pipe parameter.
You can also pass false
to the lowercase
parameter to skip the conversion to lowercase
and just replace the whitespace.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.