substrof[Qx,start,length]
String
Extracts a substring from an open-text response. Start is 0-based; length is the number of characters to extract.
Parameters
| Parameter | Type | Description |
|---|---|---|
Qx |
Question ref | An *OPEN text question |
start |
Integer | Start position (0-based, first char = 0) |
length |
Integer | Number of characters to extract |
Returns: String — the extracted substring
Examples
expressions
substrof[Q3,0,1]='Y' -- response starts with "Y" substrof[Q3,0,2]='No' -- response starts with "No"
Start index is 0-based: the first character is position 0.
Comparison is case-sensitive. "Y" and "y" are different values.