home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l460 / 2.ddi / STRFUN.DI$ / LOWER.M < prev    next >
Encoding:
Text File  |  1993-03-07  |  434 b   |  19 lines

  1. function a = lower(A)
  2. %LOWER    Convert string to lower case.
  3. %    b = lower(A) converts any upper case characters in A to
  4. %    the corresponding lower case character and leaves all
  5. %    other characters unchanged.
  6. %
  7. %    See also UPPER.
  8.  
  9. %    Copyright (c) 1984-93 by The MathWorks, Inc.
  10.  
  11. oldflops = flops;
  12. if ~isstr(A)
  13.     a = A;
  14. else
  15.     mask = ((A >= 'A') & (A <= 'Z'));
  16.     a = setstr(A + ('a' - 'A')*mask);
  17. end
  18. flops(oldflops);
  19.