*!********************************************* *! *! Procedure: within *! *!********************************************* *) Description.......: Returns string contained within two *) others. Case sensitive *] Dependencies......: * Calling Samples...: within( <expC>, <expC>, <expC> [,<expN> [,<expN>]]) * Parameter List....: tcExpression * tcLeft * tcRight * tnFirstOne * tnFollowing PROCEDURE within PARAMETER tcExpression, tcLeft, tcRight, tnFirstOne, tnFollowing LOCAL lcReturnVal, tnLeftpos lcReturnVal = [] tnLeftpos = AT( tcLeft, tcExpression, IIF( EMPTY( tnFirstOne), 1, tnFirstOne)) IF tnLeftpos> 0 tnLeftpos = tnLeftpos+LEN( tcLeft) IF tnLeftpos< LEN( tcExpression) lcReturnVal = SUBSTR( tcExpression, ; tnLeftpos, ; AT( tcRight, ; SUBSTR( tcExpression, tnLeftpos), ; IIF( EMPTY( tnFollowing), 1, tnFollowing))-1) ENDIF ENDIF RETURN lcReturnVal