General information
Category:
Coding, syntax & commands
>Is there a way to find a number within a string? Here's the twist, the number could be anywhere in the string, and I want to find any number...like this "#70 blue" or "70 blue" or "blue 70"
>
>any help appreciated:)
I would probably consider writing a function that I could pass the string in question to. I would then determine the length of the string and traverse through it one char at a time. In finding the first char that was a number, I would store it and keep moving until I ran out of numeric chars. Convert the chars found to a number and return it to the calling routine...
HTH
Michael
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only