MultilineTextDiff/VerySimpleRtfBuilder.cs
/// <summary>
/// Set positions for tabulators from string.
/// </summary>
/// <param name="tabList">List of tabulator positions (in cm) separated by semicolon.</param>
/// <param name="provider">Culture information</param>
/// <returns>
/// Current instance.
/// </returns>
/// <remarks>
/// Position of tabulators are set in cm (not pixels, points nor inch).
/// </remarks>
Set positions for tabulators from string.
Set positions for tabulators from string .
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Public user interface")]
    public VerySimpleRtfBuilder SetTabs(string tabList, CultureInfo provider)
    {
      if (provider is null)
      {
        provider = CultureInfo.CurrentCulture;
      }
      if (string.IsNullOrEmpty(tabList))
      {
        return (SetTabs());
      }
      string[] tabsStr = tabList.Split(';');
      float[] tabPos = new float[tabsStr.Length];
      for (int i = 0; i < tabsStr.Length; i++)
      {
        tabPos[i] = float.Parse(tabsStr[i], provider);
      }
      return (SetTabs(tabPos));
    }
[ SuppressMessage ( " " , " " , Justification = " " ) ] public VerySimpleRtfBuilder SetTabs ( string tabList , CultureInfo provider ) { if ( provider is null ) { provider = CultureInfo . CurrentCulture ; } if ( string . IsNullOrEmpty ( tabList ) ) { return ( SetTabs ( ) ) ; } string [ ] tabsStr = tabList . Split ( ' ' ) ; float [ ] tabPos = new float [ tabsStr . Length ] ; for ( int i = 0 ; i < tabsStr . Length ; i ++ ) { tabPos [ i ] = float . Parse ( tabsStr [ i ] , provider ) ; } return ( SetTabs ( tabPos ) ) ; }
Set positions for tabulators from string.
Set positions for tabulators from string .
None
tabList
string
List of tabulator positions (in cm) separated by semicolon.
List of tabulator positions ( in cm ) separated by semicolon .
provider
CultureInfo
None
remarks
Position of tabulators are set in cm (not pixels, points nor inch).
Position of tabulators are set in cm ( not pixels points nor inch ) .