Show / Hide Table of Contents

    StringExtensions.Left(this string value, int? n) Method

    .NET Standard 2.x

    Obtains a specified number of characters from the beginning of a string.

    Namespace: PowerScript.Bridge

    Assembly: PowerScript.Bridge.dll

    Syntax

    public static string Left(this string value, int? n);
    

    Parameters

    value System.String

    The string containing the characters you want.

    n System.Int32

    An Int specifying the number of characters you want to return.

    Returns

    System.String

    Returns the leftmost n characters in string if it succeeds and the empty string ("") if an error occurs. If n is null, Left returns null. If n is greater than or equal to the length of the string, Left returns the entire string. It does not add spaces to make the return value's length equal to n.

    Examples

    Coming soon.

    Applies to

    .NET Standard

    2.x

    Back to top Generated by Appeon