annotate scripts/strings/upper.m @ 5307:4c8a2e4e0717

[project @ 2005-04-26 19:24:27 by jwe]
author jwe
date Tue, 26 Apr 2005 19:24:47 +0000
parents c08cb1098afc
children 2618a0750ae6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3175
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
1 ## Copyright (C) 1998 John W. Eaton
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
2 ##
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
3 ## This file is part of Octave.
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
4 ##
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
5 ## Octave is free software; you can redistribute it and/or modify it
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
6 ## under the terms of the GNU General Public License as published by
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
7 ## the Free Software Foundation; either version 2, or (at your option)
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
8 ## any later version.
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
9 ##
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
10 ## Octave is distributed in the hope that it will be useful, but
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
13 ## General Public License for more details.
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
14 ##
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
15 ## You should have received a copy of the GNU General Public License
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
16 ## along with Octave; see the file COPYING. If not, write to the Free
5307
4c8a2e4e0717 [project @ 2005-04-26 19:24:27 by jwe]
jwe
parents: 5053
diff changeset
17 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
4c8a2e4e0717 [project @ 2005-04-26 19:24:27 by jwe]
jwe
parents: 5053
diff changeset
18 ## 02110-1301, USA.
3175
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
19
3416
493df428100e [project @ 2000-01-11 07:03:30 by jwe]
jwe
parents: 3407
diff changeset
20 ## -*- texinfo -*-
3499
3e3e14ad5149 [project @ 2000-01-31 05:18:07 by jwe]
jwe
parents: 3416
diff changeset
21 ## @deftypefn {Function File} {} upper (@var{s})
3e3e14ad5149 [project @ 2000-01-31 05:18:07 by jwe]
jwe
parents: 3416
diff changeset
22 ## Transform all letters in the string @var{s} to upper case.
3407
5e0a0b1cba43 [project @ 2000-01-06 03:13:55 by jwe]
jwe
parents: 3175
diff changeset
23 ## @end deftypefn
5053
c08cb1098afc [project @ 2004-10-19 23:10:54 by jwe]
jwe
parents: 3499
diff changeset
24 ##
3407
5e0a0b1cba43 [project @ 2000-01-06 03:13:55 by jwe]
jwe
parents: 3175
diff changeset
25 ## @seealso{toupper}
3175
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
26
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
27 ## Author: jwe
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
28
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
29 function retval = upper (s)
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
30
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
31 if (nargin != 1)
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
32 usage ("upper (s)");
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
33 endif
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
34
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
35 retval = toupper (s);
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
36
096940972434 [project @ 1998-05-18 17:03:01 by jwe]
jwe
parents:
diff changeset
37 endfunction