Constructors: NewChars |
Initializes an Integer array representing Unicode characters with elements copied from Values.
Public Function NewChars( ParamArray Values ( ) As Variant ) As Integer ( )
This is a convenience method to easily create an Integer array representing Unicode characters.
If a string with more than one character is processed, only the first character will be recognized. To convert an entire string to a character array use CorString.ToCharArray.
This example creates a new character array using both string and Unicode values then displays them.
Public Sub Main() Dim Chars() As Integer Dim Char As Variant Chars = NewChars("a", "b", 99, 100) Debug.Print "The set of characters." For Each Char In Chars Debug.Print CorString.Format("{0,3} = ""{0:$}""", Char) Next End Sub ' This example code produces the following output. ' ' The set of characters. ' 97 = "a" ' 98 = "b" ' 99 = "c" ' 100 = "d"