docs.unity.cn
    Show / Hide Table of Contents

    Class StringExtensions

    Extension methods for System.String.

    Inheritance
    Object
    StringExtensions
    Namespace: Unity.Tutorials.Core.Editor
    Syntax
    public static class StringExtensions : object

    Methods

    AsEmptyIfNull(String)

    Returns an empty string ("") if this string is null.

    Declaration
    public static string AsEmptyIfNull(this string self)
    Parameters
    Type Name Description
    String self
    Returns
    Type Description
    String

    AsNullIfEmpty(String)

    Returns null if this string is null or an empty string ("").

    Declaration
    public static string AsNullIfEmpty(this string self)
    Parameters
    Type Name Description
    String self
    Returns
    Type Description
    String

    AsNullIfWhiteSpace(String)

    Returns null if this string is not null, empty, or consists only of white-space characters.

    Declaration
    public static string AsNullIfWhiteSpace(this string self)
    Parameters
    Type Name Description
    String self
    Returns
    Type Description
    String

    IsNotNullOrEmpty(String)

    Indicates whether this string is not null or an empty string ("").

    Declaration
    public static bool IsNotNullOrEmpty(this string self)
    Parameters
    Type Name Description
    String self
    Returns
    Type Description
    Boolean

    IsNotNullOrWhiteSpace(String)

    Indicates whether this string is not null, empty, or consists only of white-space characters.

    Declaration
    public static bool IsNotNullOrWhiteSpace(this string self)
    Parameters
    Type Name Description
    String self
    Returns
    Type Description
    Boolean

    IsNullOrEmpty(String)

    Indicates whether this string is null or an empty string ("").

    Declaration
    public static bool IsNullOrEmpty(this string self)
    Parameters
    Type Name Description
    String self
    Returns
    Type Description
    Boolean

    IsNullOrWhiteSpace(String)

    Indicates whether this string is null, empty, or consists only of white-space characters.

    Declaration
    public static bool IsNullOrWhiteSpace(this string self)
    Parameters
    Type Name Description
    String self
    Returns
    Type Description
    Boolean
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on Thursday, July 8, 2021