docs.unity3d.com
    Show / Hide Table of Contents

    Default Formatter

    The Default Formatter performs the same logic as String.Format. All cultural formatting uses the Locale from the table that the Smart String belongs to.

    Example Smart String Arguments Result
    The cost is {0:C} 1234567.89 - Japanese Locale The cost is ¥123,457
    1234567.89 - US Locale The cost is $123,456.78
    1234567.89 - French Locale The cost is 123 456,78 €
    Today is {0:d} DateTime - Japanese Locale Today is 8/11/2021
    DateTime - US Locale Today is 11/08/2021
    DateTime - French Locale Today is 2021/08/11
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023