[ncl-talk] Is string numeric?
Carl Schreck
cjschrec at ncsu.edu
Mon Mar 21 12:09:12 MDT 2016
Is there a function that would tell me if a string is a numeric? i.e.,
contains no letters and "tofloat" won't give a warning on it?
If not, has anyone already made one? Thanks!
e.g.:
str_is_numeric( "215" ) => True
str_is_numeric( "21.5" ) => True
str_is_numeric( "21e5" ) => True
str_is_numeric( "21N5" ) => False
Carl
--
<http://www.cicsnc.org/>
<http://www.researcherid.com/rid/B-8711-2011>
* Cyclone <http://www.cyclonecenter.org/>*Center.org
<http://www.cyclonecenter.org/> *Carl J. Schreck III, PhD*
*Research Scholar / Research **Assistant Professor*
Cooperative Institute for Climate and Satellites NC (CICS
<http://www.cicsnc.org/>*-NC) <http://www.cicsnc.org/> /*
Department of Marine, Earth, and Atmospheric Sciences (MEAS)
<https://meas.sciences.ncsu.edu/>
North Carolina State University <http://ncsu.edu/>
NOAA National Centers for Environmental Information (NCEI)
<http://ncei.noaa.gov/>
151 Patton Ave, Asheville, NC 28801
e: carl_schreck at ncsu.edu
o: +1 828 257 3140
c: +1 828 484 1702
Publications
<http://scholar.google.com/citations?hl=en&user=th8ONEcAAAAJ&view_op=list_works&sortby=pubdate>
monitor.cicsnc.org/mjo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160321/27160f85/attachment.html
More information about the ncl-talk
mailing list