formatstring
nounUK /ˈfɔː.mæt ˌstrɪŋ/
US /ˈfɔːr.mæt ˌstrɪŋ/
A format string is a special piece of text that tells a computer how to put words and numbers together.
The programmer used a format string to add the player's name into the message.
RELATED WORDS
OTHER MEANINGS
2. In C programming, a string passed to functions like printf that contains conversion specifications starting with a percent sign.
The format string "%d items" prints a number followed by the word items.
3. A string used in Python's str.format method with curly-brace placeholders.
She wrote "Hello, {}!" as a format string and filled in the name later.
4. A text pattern in logging or localization systems that gets filled with values at runtime.
The error log used a format string to insert the timestamp and error code.