substr ( var, pos, len );
This built-in function returns the substring from the variable var starting with character number pos up to a maximum of len characters. Since functions are evaluated at runtime, substr( var, pos, len ) is less efficient than var( j k ) and should be used only when variable arguments are needed in the var, pos or len positions. The parameter var is a string variable, and pos and len are numbers or numeric variables.
Example
for (idx in part)
prefix[idx] = substr(part[idx], 1, 3); #
Store 1st 3 bytes of each array element
Last modified date: 10/22/2024