mida PowerHome formula function
Description
Obtains a specified number of bytes from a specified (interior) position in a string.
Syntax
mida ( string, start, length )
Argument |
Description |
string |
String from which you want bytes returned |
start |
Number. A long specifying the position of the first byte you want returned (the position of the first byte of the string is 1) |
length (optional) |
Number. A long whose value is the number of bytes you want returned. If you do not enter length or if length is greater than the number of bytes to the right of start, MidA returns the remaining bytes in the string |
Return value
String. Returns characters specified by the number of bytes in length of string starting at the byte specified by start. If start is greater than the number of bytes in string, the MidA function returns the empty string (“”). If length is greater than the number of bytes remaining after the start byte, MidA returns the remaining bytes. The return string is not filled with spaces to make it the specified length.
Examples
The following examples demonstrate typical syntax/ usage for this function.
• mida ( "[TEMP4]", 2,4)
• if( mida( "[LOCAL1]", 6, 12 ) = "HTTP/1.1 404", "ERROR", "Nextline")