UtilStringRandomReplaceLetterOrDigit Method
Replaces a letter or digit character with a random character of the same type based on these specific rules:
● If the character is a digit (
Char.IsDigit(character) ),
the function returns a different digit from the range "0" to "9".
● If the character is a letter (
Char.IsLetter(character) ):
- If it is a vowel, and it is upper-case, the function returns a different upper-case vowel.
- If it is a vowel, and it is lower-case, the function returns a different lower-case vowel.
- If it is a consonant, and it is upper-case, the function returns a different upper-case consonant.
- If it is a consonant, and it is lower-case, the function returns a different lower-case consonant.
● If the character is neither a letter nor a digit, the function returns the same character.
Namespace: DevCase.Core.DataProcessing.CommonAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static char RandomReplaceLetterOrDigit(
char character
)
Public Shared Function RandomReplaceLetterOrDigit (
character As Char
) As Char
Dim character As Char
Dim returnValue As Char
returnValue = UtilString.RandomReplaceLetterOrDigit(character)
public:
static wchar_t RandomReplaceLetterOrDigit(
wchar_t character
)
static member RandomReplaceLetterOrDigit :
character : char -> char
No code example is currently available or this language may not be supported.
- character Char
-
The character to be replaced.
Char
If the character is a letter or digit, returns a random character of the same type;
otherwise, returns the same character.