chuang4630
asked on
What is the most efficient way of extract the leading numbers from a string?
What is the most efficient way of extract the leading numbers from a string?
Example: 1020D Main Street.
Intended result: 1020
Example: 1020D Main Street.
Intended result: 1020
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Loop from the BACK of the array to the front while isdigit = false
the rest from 0 to element is your address