zeroFill

An utility to add leading zeros up to given length to a numeric string 
Please note Alphanumeric string will be left untouched

A procedure to use in Seeburger BIC Mapping Designer
It will extend your library for string handling

/*  -----------------------------
    Peter Lykkegaard, 22 mar 2019
    -----------------------------   
	Method
	   zeroFill
	Parameters
	   value$: String to prefix with zeros
	   Num%: Number of characters, length of string after prefixzing
	Returns
	   $
	Description
	   If the parameter value is a numeric value and 
	   the length of the string does not exceed length of the value
   */

   if (isNumeric(value$) && len(value$) < num%)
       copy lfill(value$, "0", num%) to value$;
   endif

   exitProc(value$);