MidByte$() function - MapBasic - 2023

MapInfo MapBasic Reference

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapBasic
Version
2023
Language
English
Product name
MapBasic
Title
MapInfo MapBasic Reference
First publish date
1985
Last updated
2023-09-12
Published on
2023-09-12T16:32:32.686312

Purpose

Accesses individual bytes of a string on a system with a double-byte character system. You can call this function from the MapBasic window in MapInfo Pro.

Syntax

MidByte$( string_expr, position, length ) 

string_expr is a string expression.

position is an integer numeric expression, indicating a starting position in the string.

length is an integer numeric expression, indicating the number of bytes to return.

Return Value

String

Description

The MidByte$() function returns individual bytes of a string.

Use the MidByte$() function when you need to extract a range of bytes from a string, and the application is running on a system that uses a double-byte character set (DBCS systems). For example, the Japanese version of Microsoft Windows uses a double-byte character system.

On systems with single-byte character sets, or in Unicode versions of MapInfo Pro, the results returned by the MidByte$() function are identical to the results returned by the Mid$() function.

See Also:

InStr() function, Left$() function, Right$() function