Fork me on GitHub
  • API

    Show / Hide Table of Contents

    Class Formatter

    Formatting utilities (for reports).

    Inheritance
    object
    Formatter
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Lucene.Net.Benchmarks.ByTask.Utils
    Assembly: Lucene.Net.Benchmark.dll
    Syntax
    public static class Formatter

    Methods

    Format(int, double, string)

    Formatting utilities (for reports).

    Declaration
    public static string Format(int numFracDigits, double f, string col)
    Parameters
    Type Name Description
    int numFracDigits
    double f
    string col
    Returns
    Type Description
    string

    Format(int, float, string)

    Pad a number from left.

    Declaration
    public static string Format(int numFracDigits, float f, string col)
    Parameters
    Type Name Description
    int numFracDigits

    Number of digits in fraction part - must be 0 or 1 or 2.

    float f

    Number to be formatted.

    string col

    Column name (used for deciding on length).

    Returns
    Type Description
    string

    Formatted string.

    Format(int, string)

    Pad a number from left.

    Declaration
    public static string Format(int n, string col)
    Parameters
    Type Name Description
    int n

    Number to be formatted.

    string col

    Column name (used for deciding on length).

    Returns
    Type Description
    string

    Formatted string.

    Format(string, string)

    Pad a string from right.

    Declaration
    public static string Format(string s, string col)
    Parameters
    Type Name Description
    string s

    String to be formatted.

    string col

    Column name (used for deciding on length).

    Returns
    Type Description
    string

    Formatted string.

    FormatPaddLeft(string, string)

    Pad a string from left.

    Declaration
    public static string FormatPaddLeft(string s, string col)
    Parameters
    Type Name Description
    string s

    String to be formatted.

    string col

    Column name (used for deciding on length).

    Returns
    Type Description
    string

    Formatted string.

    FormatPaddRight(int, double, string)

    Formatting utilities (for reports).

    Declaration
    public static string FormatPaddRight(int numFracDigits, double f, string col)
    Parameters
    Type Name Description
    int numFracDigits
    double f
    string col
    Returns
    Type Description
    string

    FormatPaddRight(int, float, string)

    Pad a number from right.

    Declaration
    public static string FormatPaddRight(int numFracDigits, float f, string col)
    Parameters
    Type Name Description
    int numFracDigits

    Number of digits in fraction part - must be 0 or 1 or 2.

    float f

    Number to be formatted.

    string col

    Column name (used for deciding on length).

    Returns
    Type Description
    string

    Formatted string.

    Back to top Copyright © 2024 The Apache Software Foundation, Licensed under the Apache License, Version 2.0
    Apache Lucene.Net, Lucene.Net, Apache, the Apache feather logo, and the Apache Lucene.Net project logo are trademarks of The Apache Software Foundation.
    All other marks mentioned may be trademarks or registered trademarks of their respective owners.