On Monday, 13 November 2023 at 14:15:31 UTC, seany wrote:
Is there a better way? I want a method that works for every variable type including classes and objects.Thank you
Perhaps, use length property of string. It should tell you length of a string and then you multiply it by size of char.