RBRandom Class Reference

Inherits from NSObject
Declared in RBRandom.h

Overview

Random value generation.

+ UUIDStringWithHyphens:

Generates a random UUID/GUID string.

+ (nonnull NSString *)UUIDStringWithHyphens:(BOOL)includeHyphens

Parameters

includeHyphens

Whether hyphens should be included.

Return Value

The random UUID string.

Declared In

RBRandom.h

+ unsignedIntegerWithMinimumValue:maximumValue:

Generates a random unsigned integer within the given range.

+ (u_int32_t)unsignedIntegerWithMinimumValue:(u_int32_t)minimumValue maximumValue:(u_int32_t)maximumValue

Parameters

minimumValue

The minimum value of the range.

maximumValue

The maximum value of the range.

Return Value

The random unsigned integer value.

Declared In

RBRandom.h

+ integerWithMinimumValue:maximumValue:

Generates a random signed integer within the given range.

+ (int32_t)integerWithMinimumValue:(int32_t)minimumValue maximumValue:(int32_t)maximumValue

Parameters

minimumValue

The minimum value of the range.

maximumValue

The maximum value of the range.

Return Value

The random signed integer value.

Declared In

RBRandom.h

+ doubleWithMinimumValue:maximumValue:

Generates a random double value within the given range.

+ (double)doubleWithMinimumValue:(double)minimumValue maximumValue:(double)maximumValue

Parameters

minimumValue

The minimum value of the range.

maximumValue

The maximum value of the range.

Return Value

The random double value.

Declared In

RBRandom.h

+ boolean

Generates a random boolean value.

+ (BOOL)boolean

Declared In

RBRandom.h

+ lorumIpsumWithWordCount:

Generates a random lorum ipsum string with the given word count.

+ (nonnull NSString *)lorumIpsumWithWordCount:(NSUInteger)wordCount

Parameters

wordCount

The number of words to include in the string.

Return Value

The random lorum ipsum string.

Declared In

RBRandom.h