A character in UTF8 can be from 1 to 4 bytes long. UTF-8 can represent any character in the Unicode standard. UTF-8 is backwards compatible with ASCII. UTF-8 is the preferred encoding for e-mail and web pages - W3Schools.com
""
len
function can be used to get number of bytes in strings[i,j].
This operation always generates new string since string are immutable. i
indicates starting index for substring including i
and j
indicates end index excluding j