Re: beer


#1

to_f will convert it to a Float, .to_i to an Integer, but these won’t
“tell” you whether it’s numerical, in fact they often accept strings
that have some digits in them but also other characters.

The better solution might be to use a regular expression, the content of
which will be entirely dependent on what type of number you are
expecting.

Sean C.
Web Services - KCKCC

removed_email_address@domain.invalid 3/29/2006 12:41 PM >>>

Hello, all

I have one string in my controller but i need to knwon how i verify if
it is numerical

Thanks…