Show / Hide Table of Contents

    StringExtensions.MidA(this string source, int? startIndex, int? length) Method

    .NET Standard 2.x

    Temporarily converts a string to DBCS, then returns the specified number of bytes from the string, starting from a specified position.

    Namespace: PowerScript.Bridge

    Assembly: PowerScript.Bridge.dll

    Syntax

    public static string MidA(this string source, int? startIndex, int? length);
    

    Parameters

    source System.String

    The string from which you want characters returned.

    startIndex System.Int32

    An int specifying the position of the first byte you want returned. (The position of the first byte of the string is 0.)

    length System.Int32

    An int whose value is the number of bytes you want returned. If you do not enter length or if length is greater than the number of bytes to the right of startIndex, MidA returns the remaining bytes in the source.

    Returns

    System.String

    Returns characters specified by the number of bytes searched in a source string, beginning at the byte specified in the startIndex argument. If startIndex is greater than the number of bytes in source, the MidA function returns an empty string (""). If length is greater than the number of bytes remaining after the start character, MidA returns the remaining bytes. The return string is not filled with spaces to make it the specified length. If any argument's value is null, MidA returns null.

    Examples

    Coming soon.

    Applies to

    .NET Standard

    2.x

    Back to top Generated by Appeon