UtilStringRandomReplaceLettersAndDigits Method

Replaces letter and digit characters in the source string, with random characters of the same type based on these specific rules:

● If a character is a digit ( Char.IsDigit(character) ), the character is replaced with a different digit from the range "0" to "9".

● If a character is a letter ( Char.IsLetter(character) ):

- If it is a vowel, and it is upper-case, the character is replaced with a different upper-case vowel.

- If it is a vowel, and it is lower-case, the character is replaced with a different lower-case vowel.

- If it is a consonant, and it is upper-case, the character is replaced with a different upper-case consonant.

- If it is a consonant, and it is lower-case, the character is replaced with a different lower-case consonant.

● If a character is neither a letter nor a digit, the character is not replaced.

Definition

Namespace: DevCase.Core.DataProcessing.Common
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static string RandomReplaceLettersAndDigits(
	string input
)

Parameters

input  String
The string to be replaced.

Return Value

String
The resulting string with letter and digit characters replaced with random characters of the same type.

See Also