This function is used to get the numbers of bytes needed to represent a specific character expression using a specific encoding.
Ret-value = ByteCount(character-expression , encoding);
Character type. Is the input string.
Character type. Is the encoding to be used.
Numeric type. Is the number of bytes needed to represent the given character expression with the specified encoding.
Suppose we want to know how many bytes are needed to represent "hello world" using the UTF-8 encoding.
&charVar = 'hello world'
&encoding = 'UTF-8'
&result = byteCount(&charVar,&encoding)
The value of &result will be 11 because in UTF-8 a character is stored in a byte.
Objects: Procedures, Reports, Transactions, Web Panels, Work Panels.
Languages: .NET, Java, .NET Mobile(1), iOS(2)
1 - Up to GeneXus X Evolution 3
2 - iOS offline support is available since GeneXus #15.
Java supported encodings
.NET supported encodings