RosettaCodeData/Task/String-length/Visual-Basic-.NET/string-length-1.vb

6 lines
164 B
VB.net

Module ByteLength
Function GetByteLength(s As String, encoding As Text.Encoding) As Integer
Return encoding.GetByteCount(s)
End Function
End Module