LibreOffice 25.2 Help
Returns a text string of a DBCS text. The parameters specify the starting position and the number of characters.
MIDB("Text"; Start; Number_bytes)
āĻĒāĻžāĻ ā§āĻ¯ āĻšāĻ˛ā§ āĻā§āĻ¨ā§ āĻŦā§āĻ° āĻāĻ°ā§ āĻāĻ¨āĻžāĻ° āĻāĻ¨ā§āĻ¯ āĻāĻāĻāĻŋ āĻ āĻā§āĻˇāĻ° āĻ¸āĻŽā§āĻŦāĻ˛āĻŋāĻ¤ āĻĒāĻžāĻ ā§āĻ¯āĨ¤
āĻļā§āĻ°ā§ āĻšāĻ˛ā§ āĻā§āĻ¨ā§ āĻŦā§āĻ° āĻāĻ°ā§ āĻāĻ¨āĻžāĻ° āĻāĻ¨ā§āĻ¯ āĻĒāĻžāĻ ā§āĻ¯ā§āĻ° āĻ āĻĢāĻŽ āĻ āĻā§āĻˇāĻ°ā§āĻ° āĻ āĻŦāĻ¸ā§āĻĨāĻžāĻ¨āĨ¤
Number_bytes specifies the number of characters MIDB will return from text, in bytes.
=MIDB("ä¸åŊ";1;0) returns "" (0 bytes is always an empty string).
=MIDB("ä¸åŊ";1;1) returns " " (1 byte is only half a DBCS character and therefore the result is a space character).
=MIDB("ä¸åŊ";1;2) returns "ä¸" (2 bytes constitute one complete DBCS character).
=MIDB("ä¸åŊ";1;3) returns "ä¸ " (3 bytes constitute one and a half DBCS character; the last byte results in a space character).
=MIDB("ä¸åŊ";1;4) returns "ä¸åŊ" (4 bytes constitute two complete DBCS characters).
=MIDB("ä¸åŊ";2;1) returns " " (byte position 2 is not at the beginning of a character in a DBCS string; 1 space character is returned).
=MIDB("ä¸åŊ";2;2) returns " " (byte position 2 points to the last half of the first character in the DBCS string; the 2 bytes asked for therefore constitutes the last half of the first character and the first half of the second character in the string; 2 space characters are therefore returned).
=MIDB("ä¸åŊ";2;3) returns " åŊ" (byte position 2 is not at the beginning of a character in a DBCS string; a space character is returned for byte position 2).
=MIDB("ä¸åŊ";3;1) returns " " (byte position 3 is at the beginning of a character in a DBCS string, but 1 byte is only half a DBCS character and a space character is therefore returned instead).
=MIDB("ä¸åŊ";3;2) returns "åŊ" (byte position 3 is at the beginning of a character in a DBCS string, and 2 bytes constitute one DBCS character).
=MIDB("office";2;3) returns "ffi" (byte position 2 is at the beginning of a character in a non-DBCS string, and 3 bytes of a non-DBCS string constitute 3 characters).