!
! >> TO LOWER <<
!
! Converts a string to lower case.
!
%external %routine To Lower %alias "3L_IMP_TO_LOWER" ( %string(*) %name S )
   %integer L = Length(S)
   %byte %name B == Byte Integer(Addr(S))
   %while L # 0 %cycle
      B == B[1]
      %if 'A' <= B <= 'Z' %then B = B-'A'+'a'
      L = L-1
   %repeat
%end
