substr (2) --- take a substring from a string 03/23/80 _C_a_l_l_i_n_g _I_n_f_o_r_m_a_t_i_o_n integer function substr (from, to, first, length) character from (ARB), to (ARB) integer first, length Library: vswtlb (standard Subsystem library) _F_u_n_c_t_i_o_n 'Substr' copies the portion of the 'from' string specified by the 'first' and 'length' arguments into the 'to' string and returns the length of 'to' string as its result. 'First' specifies the starting character position in 'from'; if it is positive, it indicates a position relative to the beginning of the string, whereas if it is negative, the indicated position is relative to the end of the string. 'Length' specifies the number of characters to be copied; if | positive, 'length' characters _s_t_a_r_t_i_n_g with the one selected | by 'first' are copied; if negative, 'length' characters | _e_n_d_i_n_g with the one selected by 'first' are copied. If the specified substring overlaps either the beginning or the end of 'from', 'to' will be shorter than 'length' characters. _A_r_g_u_m_e_n_t_s _M_o_d_i_f_i_e_d to _C_a_l_l_s length _S_e_e _A_l_s_o stake (2), sdrop (2), strim (2), take (1), drop (1), substr (1) substr (2) - 1 - substr (2)