FMLiveSwitchStringAssistant Class Reference

Contains methods for string manipulation. More...

Instance Methods

(instancetype) - init
 

Class Methods

(FMLiveSwitchGuid *) + convertStringToUuidWithUuidString:
 Converts a 32-character hexadecimal string to a valid UUID format by inserting hyphens. More...
 
(bool) + isNullOrWhiteSpaceWithS:
 
(bool) + isValidUuidWithInput:
 Determines whether the input string is a valid UUID (Universally Unique Identifier). More...
 
(FMLiveSwitchStringAssistant *) + stringAssistant
 
(NSMutableArray *) + subArray:offset:
 Creates a subarray from an existing array. More...
 
(NSMutableArray *) + subArray:offset:count:
 Creates a subarray from an existing array. More...
 

Detailed Description

Contains methods for string manipulation.

Method Documentation

◆ convertStringToUuidWithUuidString:

+ (FMLiveSwitchGuid*) convertStringToUuidWithUuidString: (NSString *)  uuidString

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

Parameters
uuidStringA 32-character string representing a UUID without hyphens.
Returns
A System.Guid object representing the formatted UUID.

◆ init

- (instancetype) init

◆ isNullOrWhiteSpaceWithS:

+ (bool) isNullOrWhiteSpaceWithS: (NSString *)  s
Parameters
sThe s.

◆ isValidUuidWithInput:

+ (bool) isValidUuidWithInput: (NSString *)  input

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

    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.
Parameters
inputThe string to validate as a UUID.
Returns
true if the input is a valid UUID; otherwise, false.

◆ stringAssistant

+ (FMLiveSwitchStringAssistant*) stringAssistant

◆ subArray:offset:

+ (NSMutableArray*) subArray: (NSMutableArray *)  array
offset: (int)  offset 

Creates a subarray from an existing array.

Parameters
arrayThe source array.
offsetThe offset into the source array.
Returns
The subarray.

◆ subArray:offset:count:

+ (NSMutableArray*) subArray: (NSMutableArray *)  array
offset: (int)  offset
count: (int)  count 

Creates a subarray from an existing array.

Parameters
arrayThe source array.
offsetThe offset into the source array.
countThe number of elements to copy into the subarray.
Returns
The subarray.