strGetStrings (Functionblock) |
Top Previous Next |
strGetStrings is similar to strGetValues. It will try to extract up to 4 strings from a string. It uses the same syntax for the format string as strFormat. strGetStrings is not case sensitive !
Input: str : STRING String that strGetValues will extract values from
format : STRING Format string, can contain up to 4 parameter references written as \1, \2, \3, and \4. Each of these will extract the value at that position and place it in v1, v2, v3, or v4. Please note that a specific number can only be referenced one time in the format string.
Output: match: BOOL This will be TRUE if a match was found and the number of strings was extracted successfully.
v1: STRING The extracted string at {1} from str.
v2: STRING The extracted string at {2} from str.
v3: STRING The extracted string at {3} from str.
v4: STRING The extracted string at {4} from str.
Declaration: FUNCTION_BLOCK strGetStrings;
Example: INCLUDE rtcu.inc |