Sometimes one needs to get the filesize of a string. For example when one wants to write this string into an Amazon SQS where there is a maximum limit of 256KB.
private numeric function getStringByteSize(required string text) { return ArrayLen( arguments.text.getBytes("UTF-8") ); }