سؤال

I want to convert a string to LongInt type. How to do that?

Should I use to_i method only? Or there is any other way to do it?

هل كانت مفيدة؟

المحلول

There's no longint type. Integers in ruby can hold arbitrarily large values. So yeah, just use .to_i.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top