Namespaces
Variants
Views
Actions

Template:nbspt

From cppreference.com
[edit] [{{purge}}] Template documentation

Handles space characters.

{{space|number}} - outputs number of space characters

{{space as|text}} - outputs as many space characters as there are characters in text. Useful for indentation of templatized code.

{{trim|text}} - trims both leading and trailing whitespace

{{sep}} - inserts a tiny non-breaking space between characters to avoid overlapping of e.g. italicized characters. Example: II vs I I.

{{nbsp|number (optional)}} - inserts number of non-breaking space characters (HTML:  ). Without the argument inserts one such space.

{{nbspt|number (optional)}} - same space characters generator as {{nbsp}} but in monospace (teletype) font.

{{void}} - as-if inserts an empty space which might be necessary to prevent HTML generation when wiki-media processor should act. One example is foo<Ref> in which the <Ref> part provokes an HTML engine to generate a references list. To suppress that, this code could be written as {{c|foo<{{void}}Ref>}}.

{{br}} - behaves similar to <br> HTML tag, except that the wrap occurs only if the string does not fit as one line in an enclosing box. Useful in tables to optionally split long identifiers.

Example. Let the identifier __cpp_lib_allocator_traits_is_always_equal be tagged as

{{tt|__cpp_lib_allocator_}}{{br}}{{tt|traits_is_always_equal}}.

Then the rendering of the boxes containing it may result in:

__cpp_lib_allocator_traits_is_always_equal
__cpp_lib_allocator_traits_is_always_equal