Search Unity

Padding a Score String with Zeros...

Discussion in 'Scripting' started by Jonathan Czeck, Nov 1, 2005.

  1. Jonathan Czeck

    Jonathan Czeck

    Joined:
    Mar 17, 2005
    Posts:
    1,713
    Any idea what magical .NET class I would need for this?

    I could do it with (pseudocode)

    Code (csharp):
    1. until scoreText.length >= 10
    2.    scoreText = "0" + scoreText;
    But I've been looking for more formatting stuff in .NET. Perhaps text wrapping based on character count even.

    Thanks!
    -Jon
     
  2. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    google String.Format