This documentation was styled with a demo skin from the Premium Pack 4 add-on for Help & Manual. The contents of the skin are encrypted and not configurable. You can only publish HM projects with this skin. You cannot edit it or change it.
This version is copyright and may only be used for local testing purposes. It may not be distributed.
Please purchase the full version of the Premium Pack to get the configurable skins and remove this notice. The package will also include the Toolbox configuration utility for Premium Pack skins.
Description
Replace bytes in a variable string with bytes from another string expression.
Syntax
MID$(StringVariable, PositionStart [, ByLen]) = StringExpression
Returns
None
Parameters
Name |
Type |
Optional |
Meaning |
StringVariable |
String |
No |
String inside which will take place MID substitution |
PositionStart |
Number |
No |
Position inside StringVariable where substitution will start. If PositionStart is negative, the starting position is assumed to be PositionStart bytes from the end of the string. |
ByLen |
Number |
Yes |
If ByLen is included, it determines how many bytes of replacement string are inserted into StringVariable. If ByLen is omitted, all of replacement string is used. If ByLen is negative, it is interpreted as: LEN(StringVariable)-ABS(ByLen). |
Remarks
The replacement will never extend past the end of the original string_variable.
MID$ never alters the length of a string.
For a similar function that can alter the length of a string, please refer to the REPLACE$ function.
Restrictions
See also
String Handling, MID$, MIDF$, LEFT$, RIGHT$, MIDW$
Examples