Intel® Fortran Compiler 17.0 Developer Guide and Reference

MBStrLead (W*S)

NLS Function: Performs a context-sensitive test to determine whether a given character byte in a string is a multibyte-character lead byte.

Module

USE IFNLS

result = MBStrLead (string,position)

string

(Input) Character*(*). String containing the character byte to be tested for lead status.

position

(Input) INTEGER(4). Position in string of the character byte in the string to be tested.

Results

The result type is LOGICAL(4). The result is .TRUE. if the character byte in position of string is a lead byte; otherwise, .FALSE..

MBStrLead is passed a whole string and can identify any byte within the string as a lead or trail byte because it performs a context-sensitive test, scanning all the way back to the beginning of a string if necessary to establish context.

MBLead is passed only one character at a time and must start on a lead byte and step through a string one character at a time to establish context for the character. So, MBStrLead can be much slower than MBLead (up to n times slower, where n is the length of the string).

See Also