Search Results for

    Show / Hide Table of Contents

    Class StringAssistant

    Contains methods for string manipulation.

    Inheritance
    System.Object
    StringAssistant
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ToString()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: FM.LiveSwitch
    Assembly: FM.LiveSwitch.dll
    Syntax
    public class StringAssistant

    Methods

    ConvertStringToUuid(String)

    Converts a 32-character hexadecimal string to a valid UUID format by inserting hyphens.

    Declaration
    public static Guid ConvertStringToUuid(string uuidString)
    Parameters
    Type Name Description
    System.String uuidString

    A 32-character string representing a UUID without hyphens.

    Returns
    Type Description
    System.Guid

    A System.Guid object representing the formatted UUID.

    IsNullOrWhiteSpace(String)

    Declaration
    public static bool IsNullOrWhiteSpace(string s)
    Parameters
    Type Name Description
    System.String s

    The s.

    Returns
    Type Description
    System.Boolean

    IsValidUuid(String)

    Determines whether the input string is a valid UUID (Universally Unique Identifier).

    Declaration
    public static bool IsValidUuid(string input)
    Parameters
    Type Name Description
    System.String input

    The string to validate as a UUID.

    Returns
    Type Description
    System.Boolean

    true if the input is a valid UUID; otherwise, false.

    Remarks

    This method considers various UUID formats as valid, including:

    • 32 digits without separators
    • 32 digits with hyphens (8-4-4-4-12 format)
    • UUIDs enclosed in braces or parentheses An empty, null, or whitespace-only input is considered invalid.

    SubArray(String[], Int32)

    Creates a subarray from an existing array.

    Declaration
    public static string[] SubArray(string[] array, int offset)
    Parameters
    Type Name Description
    System.String[] array

    The source array.

    System.Int32 offset

    The offset into the source array.

    Returns
    Type Description
    System.String[]

    The subarray.

    SubArray(String[], Int32, Int32)

    Creates a subarray from an existing array.

    Declaration
    public static string[] SubArray(string[] array, int offset, int count)
    Parameters
    Type Name Description
    System.String[] array

    The source array.

    System.Int32 offset

    The offset into the source array.

    System.Int32 count

    The number of elements to copy into the subarray.

    Returns
    Type Description
    System.String[]

    The subarray.

    In This Article
    Back to top Copyright © LiveSwitch Inc. All Rights Reserved. Doc build for LiveSwitch v1.25.0