UtilStringWrapCharacters Method
Decorates the input string by wrapping each character with the specified decorative symbols
for its left and right sides.
For example, if the input string is 'ABC', the resulting string could be similar to this: '{A}{B}{C}'.
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 WrapCharacters(
string input,
char leftChar,
char rightChar,
bool surroundNonAlphanumeric = false,
bool squishRepeatedDecorationChars = false
)
Public Shared Function WrapCharacters (
input As String,
leftChar As Char,
rightChar As Char,
Optional surroundNonAlphanumeric As Boolean = false,
Optional squishRepeatedDecorationChars As Boolean = false
) As String
Dim input As String
Dim leftChar As Char
Dim rightChar As Char
Dim surroundNonAlphanumeric As Boolean
Dim squishRepeatedDecorationChars As Boolean
Dim returnValue As String
returnValue = UtilString.WrapCharacters(input,
leftChar, rightChar, surroundNonAlphanumeric,
squishRepeatedDecorationChars)
public:
static String^ WrapCharacters(
String^ input,
wchar_t leftChar,
wchar_t rightChar,
bool surroundNonAlphanumeric = false,
bool squishRepeatedDecorationChars = false
)
static member WrapCharacters :
input : string *
leftChar : char *
rightChar : char *
?surroundNonAlphanumeric : bool *
?squishRepeatedDecorationChars : bool
(* Defaults:
let _surroundNonAlphanumeric = defaultArg surroundNonAlphanumeric false
let _squishRepeatedDecorationChars = defaultArg squishRepeatedDecorationChars false
*)
-> string
No code example is currently available or this language may not be supported.
- input String
-
The input string to decorate.
- leftChar Char
-
The character used for decorating the left side of the characters in the input string.
- rightChar Char
-
The character used for decorating the right side of the characters in the input string.
- surroundNonAlphanumeric Boolean (Optional)
-
If true, also decorates non-alphanumeric characters.
Default value is: False.
- squishRepeatedDecorationChars Boolean (Optional)
-
If true, and if leftChar and rightChar are the same characters,
only draws the decorative symbol for the left side of the characters in the input string.
Default value is: False.
String
The resulting decorated string.