given an address in a string, i need to parse the address from the string and return the structure Address.
Signature: Address parseAddress(St ring address)
Input: String with address(e.g. “Lunkad Tower, 6th floor, \r\n Viman Nagar, \r\n Pune 411014")
Output: The structure Address
public class Address
{
public string Street {get;set;}; // Lunkad Tower, 6th floor
public string...
User Profile
Collapse
-
how to parse an address string
-
public class Address
{
public string Street {get;set;}; // Lunkad Tower, 6th floor
public string Locality {get;set;}; // Viman Nagar
public string City {get;set;}; // Pune
public string State {get;set;}; // MH, Maharashtra
public string PostalCode {get;set;}; // 60611
public string Country {get;set;}; // e.g. India, IN
}
can anyone help me write the... -
well yes i understand its almost impossible to a code that would be 100% accurate. luckily though we've been told that we can make any assumptions we like, so maybe you could restrict the code to some standard format and write the code just based on that..... how would one write code then?Leave a comment:
-
How to parse address string using any language
for example if user enters Passing the parseAddress function "A. P. Croll & Son 2299 Lewes-Georgetown Hwy, Georgetown, DE 19947" returns:
2299 Lewes-Georgetown Hwy
A. P. Croll & Son
Georgetown
DE
19947
i have thought of the following algorithm but i am having trouble implementing it...can anyone help me write the code? i know C and a bit of C++, so would prefer if the code...
No activity results to display
Show More
Leave a comment: