upcase

func upcase(s : String) -> String
  result := s
  for i, ch in indexed(s) | ch in {`a'..`z'}
    result(i) := uppered(ch)
  loop
  
func uppered(ch : {`a'..`z'}) -> {`A'..`Z'}
  upper := [`A'..`Z']
  return upper(index([`a'..`z'], ch))

Returns a copy of s with all lower case characters converted to upper case.

See also: locase


Herman Venter

This is Slim documentation as snarfed on 27 May 1999 by dB.