Jump to content

Recommended Posts

Won't work. casting strings to ints only works when you have an int surrounded by quotes, like "2" or "5" or "15", however if you use the word, IE "two", "five", or "fifteen" they get cast to zero (as do all other non integer strings)

Ah, I didn't think you meant the word 'fifteen'.

 

Nope, no built-in function.  You'll most likely have to regex the string for a known number value, then return the integer equivalent.

 

Fake EDIT: or use one of the functions found in Mark's link.

thanks mark, the specific function you linked to is the opposite of what I want though hehe, (its ints to words, not words to ints). I was going to write the function but just wanted to know if there was a built in one already.

 

thanks everyone

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.