Skip to content
Navigation Menu
Sign in
Products
Platform
GitHub
Repository hosting, code review, and collaboration
Copilot
AI coding agent for tasks, projects and automated work
Build & Ship
Actions
CI/CD and automation
Code Quality
Quality analysis, fixes, and enforcement
Codespaces
Cloud development environments
Secure
Code Security
Vulnerability detection and remediation
Secret Protection
Secret scanning and leak prevention
All Features
Developers
Learn
Documentation
Training
Certifications
Build
Build with Copilot
Customize Copilot
Integrations
Explore
Trending repos
GitHub Sponsors
Events
Changelog
Changelog
Your source for the latest features, improvements, and fixes across GitHub products, all in one place.
Businesses
By Stage
Enterprises
Team
Startups
Nonprofits
By Industry
Healthcare
Financial services
Manufacturing
Government
See all industries
Evaluate GitHub
Why GitHub
Customer Stories
Business insights
Trust Center
Add-ons
GitHub Advanced Security
Enterprise-grade code security
Copilot for business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Resources
Learn & Connect
Documentation
Resource center
Blog
Events & webinars
Community Forum
Customer Stories
Integrations
Support
Customer support
Training
GitHub Status
Company
About
Partners
Changelog
GitHub Universe
GitHub Universe
The event for developers, by developers — talks, workshops, and what’s next for GitHub.
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
axuno
SmartFormat
Repository navigation
Code
Issues
2
(2)
Pull requests
Discussions
Actions
Projects
Wiki
Security and quality
Insights
More
items
SmartFormat Syntax
Jump to bottom
Edit
New page
axunonb edited this page
Feb 27, 2022
·
1 revision
Todo
Wiki pages
Pages
53
Loading
Home
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Character Literals in Format Strings
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Choose _ ChooseFormatter
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Common Pitfalls
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Condition _ ConditionalFormatter
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Configuration
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Creating Your Own Extension
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Data Source Extensions
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Default _ DefaultFormatter
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Error Handling and Tracking
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Extension Methods
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
How Formatters Work
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
HTML with CSS or JavaScript
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Installation
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
License
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Lists _ ListFormatter
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Localization _ LocalizationFormatter
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Migration
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Null _ NullFormatter
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Placeholders and Nesting
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Pluralization _ PluralLocalizationFormatter
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
RegEx _ IsMatchFormatter
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
SmartFormat Syntax
Loading
string.Format Compatibility
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
SubString _ SubStringFormatter
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Syntax, Terminology
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Templates _ TemplateFormatter
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Thread Safety
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
TimeSpan _ TimeFormatter
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 Character Literals in Format Strings
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 Choose
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 Common Pitfalls
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 Compatibility with string.Format
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 Conditional
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 Creating your own extension
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 Data Sources
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 Dot Notation
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 Home
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 HTML with CSS or JavaScript
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 IsMatch
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 Lists
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 Overview
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 Performance
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 Placeholders and Nesting
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 Pluralization
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 Project Information
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 SmartSettings
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 StringBuilder.AppendLineSmart, Console.Out.WriteLineSmart
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 SubString
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 TemplateFormatter
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
v2 Writing an Extension
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
Why Migrate
Uh oh!
There was an error while loading.
Please reload this page
.
Loading
XML _ XElementFormatter
Uh oh!
There was an error while loading.
Please reload this page
.
Show 38 more pages…
3.6
Home
Getting started
Installation
Configuration
Thread Safety
Error Handling and Tracking
Common Pitfalls
Migration from v2
Why Migrate
Migration
Syntax
Syntax, Terminology
Placeholders and Nesting
string.Format Compatibility
Character Literals in Format Strings
HTML With CSS or JavaScript
Extension Basics
How Formatters Work
Creating Your Own Extension
Extensions
Data Source Extensions
Default _ DefaultFormatter
Lists _ ListFormatter
Choose _ ChooseFormatter
Condition _ ConditionalFormatter
Null _ NullFormatter
SubString _ SubStringFormatter
RegEx _ IsMatchFormatter
Pluralization _ PluralLocalizationFormatter
Localization _ LocalizationFormatter
Templates _ TemplateFormatter
TimeSpan _ TimeFormatter
XML _ XElementFormatter
Extension Methods
License
Version 2.x
Home
Common Pitfalls
HTML with CSS or JavaScript
Overview
Main Features
Dot Notation
Error Handling
Placeholders and Nesting
Data Sources
Character Literals in Format Strings
Formatters
Conditional
Pluralization
Choose
Lists
IsMatch
SubString
Extra Features
Console and StringBuilder
TemplateFormatter
SmartSettings
to control Smart.Format behavior
Additional Info
Creating your own extension
Performance
Compatibility with string.Format
License
Clone this wiki locally
You can’t perform that action at this time.