/// <summary>
 /// Formats a string based on a format string passed in.
 /// The default formatter uses the following format:
 /// # = digits
 /// @ = alpha characters
 /// \ = escape char
 /// </summary>
 /// <param name="Input">Input string</param>
 /// <param name="Format">Format of the output string</param>
 /// <param name="Provider">String formatter provider (defaults to GenericStringFormatter)</param>
 /// <returns>The formatted string</returns>
 public static string FormatString(this string Input, string Format, IStringFormatter Provider = null)
 {
     return Provider.NullCheck(new GenericStringFormatter()).Format(Input, Format);
 }
Пример #2
0
 /// <summary>
 /// Formats a string based on a format string passed in.
 /// The default formatter uses the following format:
 /// # = digits
 /// @ = alpha characters
 /// \ = escape char
 /// </summary>
 /// <param name="Input">Input string</param>
 /// <param name="Format">Format of the output string</param>
 /// <param name="Provider">String formatter provider (defaults to GenericStringFormatter)</param>
 /// <returns>The formatted string</returns>
 public static string FormatString(this string Input, string Format, IStringFormatter Provider = null)
 {
     return(Provider.NullCheck(new GenericStringFormatter()).Format(Input, Format));
 }
Пример #3
0
 /// <summary>
 ///     Formats a string based on a format string passed in.
 ///     The default formatter uses the following format:
 ///     # = digits
 ///     @ = alpha characters
 ///     \ = escape char
 /// </summary>
 /// <param name="input">Input string</param>
 /// <param name="format">Format of the output string</param>
 /// <param name="provider">String formatter provider (defaults to GenericStringFormatter)</param>
 /// <returns>The formatted string</returns>
 public static string FormatString(this string input, string format, IStringFormatter provider = null)
 {
     return provider.NullCheck(new GenericStringFormatter()).Format(input, format);
 }
Пример #4
0
 /// <summary>
 ///     Formats a string based on a format string passed in.
 ///     The default formatter uses the following format:
 ///     # = digits
 ///     @ = alpha characters
 ///     \ = escape char
 /// </summary>
 /// <param name="input">Input string</param>
 /// <param name="format">Format of the output string</param>
 /// <param name="provider">String formatter provider (defaults to GenericStringFormatter)</param>
 /// <returns>The formatted string</returns>
 public static string FormatString(this string input, string format, IStringFormatter provider = null)
 {
     return(provider.NullCheck(new GenericStringFormatter()).Format(input, format));
 }