Table of Contents

HasConsecutiveCharacters Method

Definition

Namespace
Cuemon
Assemblies
Cuemon.Kernel.dll
Source
src/Cuemon.Kernel/Condition.cs

HasConsecutiveCharacters(string, IEnumerable<char>, int)

Determines whether the specified value contains at least one of the succession characters of length.

public static bool HasConsecutiveCharacters(string value, IEnumerable<char> characters, int length = 2)

Parameters

value string

The value to test for consecutive characters.

characters IEnumerable<char>

The character to locate with the specified length.

length int

The number of characters in succession.

Returns

bool

true if the specified value contains at least one of the succession characters of length; otherwise, false.

HasConsecutiveCharacters(string, char, int)

Determines whether the specified value contains a succession character of length.

public static bool HasConsecutiveCharacters(string value, char character, int length = 2)

Parameters

value string

The value to test for consecutive characters.

character char

The characters to locate with the specified length.

length int

The number of characters in succession.

Returns

bool

true if the specified value contains a succession character of length; otherwise, false.