Constructors: NewCharEnumerator |
Creates an enumerator used to iterate over the Unicode characters of a String.
Public Function NewCharEnumerator( ByRef s As String, Optional ByVal CopyString As Boolean ) As CharEnumerator
By default CharEnumerator makes a copy of the passed in string. The original string can be changed as normal.
If CopyString is set to False, then the original string must not change or go out of scope for the duration of the CharEnumerator objects life time.
By telling CharEnumerator to not make a copy of the original string, memory is not allocated for the string, which can be helpful for large strings.