-
January 25th, 2011, 06:34 PM
#1
Convert String
Hello
I have some trouble interpreting a string and I hope you can help me.
I have to convert a string, or a word in a number. Like five hundred fifty in 550. I dont know exactly how to do it.
I was thinking to try to analize each word, but this seems like a huge code. Or i was thinking that maybe you can check in a table, but then the table should be huge(numbers should go up to millions)
Is there a smarter way? What do you suggest?
Thank you very much
-
January 26th, 2011, 04:41 AM
#2
Re: Convert String
Originally Posted by CD1
... Or i was thinking that maybe you can check in a table, but then the table should be huge(numbers should go up to millions)
Yes, but not the all nembers between 0 and 1000000.
only the following:
1 to 20 ( 0 to 20)
30, 40, 50, 60, 70, 80, 90
100
1000
1000000
Victor Nijegorodov
-
January 26th, 2011, 04:56 AM
#3
Re: Convert String
Here is a thread that may be helpful: http://www.codeguru.com/forum/showthread.php?t=506579. But be aware that this conversion probably can't be done in a few lines of code.
HTH
I was thrown out of college for cheating on the metaphysics exam; I looked into the soul of the boy sitting next to me.
This is a snakeskin jacket! And for me it's a symbol of my individuality, and my belief... in personal freedom.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|