;--[   Function: Left()    ]----------(last revised: 3/3/2002)-
;
;- Author:
;
;    Jan Kvalbein
;
;- Action:
;
;    Returns a String containing a specified number of characters from the left side of a string
;
;- Syntax:
;
;    Left ($strText, $intPos)
;
;- Parameters:
;
;    $strText  (Required / String)
;       String expression from which the leftmost characters are returned
;    $intPos  (Required / Numeric)
;       Numeric expression indicating how many characters to return
;
;- Remarks:
;
;    Extended use of SUBSTR
;
;- Returns:
;
;    String containing a specified number of characters from the left side of a string
;
;- Dependencies:
;
;    None
;
;- Example:
;
;    $FirstName = Left("Bill Gates",4)
;
FUNCTION Left ($strtext, $intpos)
  IF (Len($strtext) >= $intpos)
    $left = Substr($strtext, 1, $intpos)
  ELSE
    $left = "LEFT() ERROR: String is to short"
  ENDIF
ENDFUNCTION ; - Left -