]> gitweb.michael.orlitzky.com - dead/census-tools.git/blob - src/StringUtils.py
Added the linear program solving the midatlantic region.
[dead/census-tools.git] / src / StringUtils.py
1 def is_integer(s):
2 try:
3 x = int(s)
4 return True
5 except:
6 return False
7
8
9 def is_float(s):
10 try:
11 x = float(s)
12 return True
13 except:
14 return False
15
16
17 def is_negative_float(s):
18 return (is_float(s) and (float(s) < 0.0))