Prev: ruby for TT
Next: Solar System (#227)
From: Xavier Noria on 19 Jan 2010 10:52 On Tue, Jan 19, 2010 at 3:37 PM, Rick DeNatale <rick.denatale(a)gmail.com> wrote: > def safe_string_to_int(string) > Â Â if /^\d+$/.match(string) \A and \z would be better surely for the same price.
From: Rick DeNatale on 19 Jan 2010 12:55
On Tue, Jan 19, 2010 at 10:52 AM, Xavier Noria <fxn(a)hashref.com> wrote: > On Tue, Jan 19, 2010 at 3:37 PM, Rick DeNatale <rick.denatale(a)gmail.com> wrote: > >> def safe_string_to_int(string) >> if /^\d+$/.match(string) > > \A and \z would be better surely for the same price. Yep. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale |