DansTonCode.net
quote.smartness() == 42The best programmers are not marginally better than merely good ones. They are an order-of-magnitude better, measured by whatever standard: conceptual creativity, speed, ingenuity of design, or problem-solving ability.@author Randall E. Stross
Quote #296
csharp
@
author 
Anonymous
0
        public string PrependZeroes(int stringLength, string str)
        {
            var sb = new StringBuilder();
            for (var ix = 0; ix < stringLength; ix++)
            {
                sb.Append("0");
            }
            sb.Append(str);
            var startIx = sb.Length - stringLength;
            if (startIx < 0)
                startIx = 0;
            return sb.ToString().Substring(startIx, stringLength);
        }
Code source n°296
Code-source en csharp proposé par Anonymous
 
 0