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.
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 string RandomReplaceLettersAndDigits(
string input
)
Public Shared Function RandomReplaceLettersAndDigits (
input As String
) As String
Dim input As String
Dim returnValue As String
returnValue = UtilString.RandomReplaceLettersAndDigits(input)
public:
static String^ RandomReplaceLettersAndDigits(
String^ input
)
static member RandomReplaceLettersAndDigits :
input : string -> string
No code example is currently available or this language may not be supported.
- input String
-
The string to be replaced.
String
The resulting string with letter and digit characters replaced with random characters of the same type.