Mercurial > hg > octave-lyh
annotate scripts/strings/isletter.m @ 17398:4bcd301754ce
Add Matlab-compatible flintmax function
* bitfcns.cc (Fflintmax): New function based on bitmax.
(Fbitmax, Fintmax, Fintmin): Update seealso to refer to flintmax.
* numbers.txi: Include flintmax docstring.
author | Mike Miller <mtmiller@ieee.org> |
---|---|
date | Sun, 08 Sep 2013 17:28:05 -0400 |
parents | f3d52523cde1 |
children |
rev | line source |
---|---|
14138
72c96de7a403
maint: update copyright notices for 2012
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
1 ## Copyright (C) 1998-2012 John W. Eaton |
3169 | 2 ## |
3 ## This file is part of Octave. | |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
6 ## under the terms of the GNU General Public License as published by | |
7016 | 7 ## the Free Software Foundation; either version 3 of the License, or (at |
8 ## your option) any later version. | |
3169 | 9 ## |
10 ## Octave is distributed in the hope that it will be useful, but | |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 ## General Public License for more details. | |
14 ## | |
15 ## You should have received a copy of the GNU General Public License | |
7016 | 16 ## along with Octave; see the file COPYING. If not, see |
17 ## <http://www.gnu.org/licenses/>. | |
3169 | 18 |
3446 | 19 ## -*- texinfo -*- |
3501 | 20 ## @deftypefn {Function File} {} isletter (@var{s}) |
11431
0d9640d755b1
Improve docstrings for all isXXX functions.
Rik <octave@nomad.inbox5.com>
parents:
8920
diff
changeset
|
21 ## Return a logical array which is true where the elements of @var{s} |
0d9640d755b1
Improve docstrings for all isXXX functions.
Rik <octave@nomad.inbox5.com>
parents:
8920
diff
changeset
|
22 ## are letters and false where they are not. This is an alias for |
0d9640d755b1
Improve docstrings for all isXXX functions.
Rik <octave@nomad.inbox5.com>
parents:
8920
diff
changeset
|
23 ## the @code{isalpha} function. |
0d9640d755b1
Improve docstrings for all isXXX functions.
Rik <octave@nomad.inbox5.com>
parents:
8920
diff
changeset
|
24 ## @seealso{isalpha, isdigit, ispunct, isspace, iscntrl, isalnum} |
3407 | 25 ## @end deftypefn |
3169 | 26 |
27 ## Author: jwe | |
28 | |
29 function retval = isletter (s) | |
30 | |
31 if (nargin != 1) | |
6046 | 32 print_usage (); |
3169 | 33 endif |
34 | |
35 retval = isalpha (s); | |
36 | |
37 endfunction | |
8442
502e58a0d44f
Fix docstrings, add examples, references and tests to string functions
Thorsten Meyer <thorsten.meyier@gmx.de>
parents:
7017
diff
changeset
|
38 |
14363
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
39 |
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
40 %!error isletter () |
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
41 %!error isletter ("a", "b") |
f3d52523cde1
Use Octave coding conventions in all m-file %!test blocks
Rik <octave@nomad.inbox5.com>
parents:
14138
diff
changeset
|
42 |