GetBytes() bug?

leongcc

Member
Licensed User
Longtime User
When the string=null, GetBytes() returns a byte array with arbituary values.
When the string="", GetBytes() returns null.
Is this behaviour normal ?

The codes are test codes.
B4X:
Dim  s As  String = Null
Dim  a() As  Byte
a = s.GetBytes("UTF8")
 
Top