Exemplo n.º 1
0
 //! Concatenate a formatted string with arguments
 public static StringBuilder ConcatFormat <A, B, C>(this StringBuilder string_builder, String format_string, A arg1, B arg2, C arg3, NumberFormatInfo numberFormat = null)
     where A : IConvertible
     where B : IConvertible
     where C : IConvertible
 {
     return(string_builder.ConcatFormat <A, B, C, int>(format_string, arg1, arg2, arg3, 0, numberFormat));
 }
Exemplo n.º 2
0
 public static StringBuilder AppendFormatedDecimal(this StringBuilder sb, string before, float value, int decimalDigits, string after = "")
 {
     sb.Clear();
     m_numberFormatInfoHelper.NumberDecimalDigits = decimalDigits;
     sb.ConcatFormat("{0}{1 }{2}", before, value, after, m_numberFormatInfoHelper);
     return(sb);
 }
Exemplo n.º 3
0
 //! Concatenate a formatted string with arguments
 public static StringBuilder ConcatFormat <A>(this StringBuilder string_builder, String format_string, A arg1, NumberFormatInfo numberFormat = null)
     where A : IConvertible
 {
     return(string_builder.ConcatFormat <A, int, int, int>(format_string, arg1, 0, 0, 0, numberFormat));
 }
Exemplo n.º 4
0
 public static StringBuilder GetFormatedBool(this StringBuilder sb, string before, bool value, string after = "")
 {
     sb.Clear();
     sb.ConcatFormat("{0}{1}{2}", before, value, after);
     return(sb);
 }
Exemplo n.º 5
0
 public static StringBuilder AppendDecimal(this StringBuilder sb, double number, int decimals)
 {
     m_numberFormatInfoHelper.NumberDecimalDigits = Math.Max(0, Math.Min(decimals, 99));
     sb.ConcatFormat("{0}", number, m_numberFormatInfoHelper);
     return(sb);
 }
Exemplo n.º 6
0
 public static StringBuilder AppendInt32(this StringBuilder sb, int number)
 {
     sb.ConcatFormat("{0}", number);
     return(sb);
 }