I would like to retrieve a part of a string determined by Bytes. For example, if the string is likes this:
myText = "abcdefghijklmn";
I would like to take the first 10 bytes from the string, so the result will be: abcdefghij";
I need to calculate by bytes because I need to conside if the input string may not be English. For example if it is chinese, then one chinese letter may use 2 bytes instead.