/// <summary> /// Performs the reverse of <see cref="StringExtensions.FormatInvariant(String, Object[])"/> by trying to /// determine what the string representations of the objects were when they were formatted into /// <paramref name="format"/> to yield <paramref name="formatted"/>. /// </summary> /// /// <param name="formatted"> /// The result of formatting <paramref name="format"/> with zero or more objects. /// </param> /// /// <param name="format"> /// A composite format string. /// </param> /// /// <returns> /// An <see cref="IList{String}"/> representing the string representations of the objects formatted into /// <paramref name="format"/>. /// </returns> public static IList<string> UnformatInvariant(string formatted, string format) { var unformatter = new Unformatter (format, false); return unformatter.Unformat (formatted); }
/// <summary> /// Performs the reverse of <see cref="StringExtensions.FormatInvariant(String, Object[])"/> by trying to /// determine what the string representations of the objects were when they were formatted into /// <paramref name="format"/> to yield <paramref name="formatted"/>. /// </summary> /// /// <param name="formatted"> /// The result of formatting <paramref name="format"/> with zero or more objects. /// </param> /// /// <param name="format"> /// A composite format string. /// </param> /// /// <returns> /// An <see cref="IList{String}"/> representing the string representations of the objects formatted into /// <paramref name="format"/>. /// </returns> public static IList <string> UnformatInvariant(string formatted, string format) { var unformatter = new Unformatter(format, false); return(unformatter.Unformat(formatted)); }
/// <summary> /// Performs the reverse of <see cref="FormatInvariant(String, Object[])"/> by trying to determine what the /// string representations of the objects were when they were formatted into <paramref name="format"/> to yield /// <paramref name="formatted"/>. /// </summary> /// /// <param name="formatted"> /// The result of formatting <paramref name="format"/> with zero or more objects. /// </param> /// /// <param name="format"> /// A composite format string. /// </param> /// /// <returns> /// An <see cref="IList{String}"/> representing the string representations of the objects formatted into /// <paramref name="format"/>. /// </returns> /// /// <remarks> /// An extension method version of <see cref="Unformatter.UnformatInvariant(String, String)"/>. /// </remarks> public static IList <string> UnformatInvariant(this string formatted, string format) { return(Unformatter.UnformatInvariant(formatted, format)); }