byteOffset | |||||||||||||
Type | function | ||||||||||||
Dictionary | LCS | ||||||||||||
Library | LiveCode Script | ||||||||||||
Syntax |
| ||||||||||||
Summary | Returns the byte position of the first occourence of the specified string of binary data within container of binary data. | ||||||||||||
Introduced | 7.0 | ||||||||||||
OS | mac, windows, linux, ios, android | ||||||||||||
Platforms | desktop, server, mobile | ||||||||||||
Parameters |
| ||||||||||||
Example |
| ||||||||||||
Values |
| ||||||||||||
Related | Keyword: character, characters, integer, string, point Operator: begins with Command: find, sort container Function: offset, wordOffset, itemOffset, lineOffset, length, value Control Structure: function Glossary: binary data, return, non-negative | ||||||||||||
Description | Use the byteOffset function to find where a string of binary data occurs within a container of binary data. The value returned by the byteOffset function is the number of the bytes where bytesToFind appears in binaryStringToSearch. If the bytessToFind is not in binaryStringToSearch, the byteOffset function returns zero. If the bytesToFind contains more than one byte, and the entire bytesToFind appears in the bytesToSearch, the byteOffset function returns the byte number where the bytesToFind starts. If you specify how many bytesToSkip, the byteOffset function skips the specified number of bytes in the binaryStringToSearch. The value returned is relative to this starting point instead of the beginning of the binaryStringToSearch. | ||||||||||||
Tags | data processing |