How can I format an inline code in Confluence like this? I mean, not a separate code block, but just inline classname, for example.
If you want to insert a large code block with optional line numbers, etc use the Code Macro (available under Macros -> Other).
At the time of this writing, I found that neither {{string}} nor {{ string }} work. My control panel only had the code block button.
However, there was a shortcut listed for fixed-width formatting: Ctrl+Shift+M.
I poked around in the menus but was not able to find out what version is being served to us.
I use a combination of Zelphir and Peter Gluck's answers. i.e.
<code>bovvered</code>