Back to Hugo

rune literal

docs/content/en/quick-reference/glossary/rune-literal.md

0.161.1706 B
Original Source

A rune literal is the textual representation of a rune within a template. It consists of a character sequence enclosed in single quotes, such as 'x', '\n', or 'ü'.

Unlike interpreted string literals or raw string literals, which represent a sequence of characters, a rune literal represents a single integer value identifying a Unicode code point. Within the quotes, any character may appear except a newline or an unescaped single quote. Multi-character sequences starting with a backslash (\) can be used to encode specific values, such as \n for a newline or \u00FC for the letter ü.