Java XML Parse String parseAddressLines(String[] addressLines)

Here you can find the source of parseAddressLines(String[] addressLines)

Description

parse Address Lines

License

Apache License

Declaration

public static ArrayList<String> parseAddressLines(String[] addressLines) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.util.ArrayList;

public class Main {
    public static ArrayList<String> parseAddressLines(String[] addressLines) {
        ArrayList<String> fields = new ArrayList<String>();
        for (String addressLine : addressLines) {
            String[] addresses = addressLine.split(",");
            for (String address : addresses) {
                address = address.trim().replaceAll("\t", "").replaceAll("\n", "").replaceAll("\r", "");
                fields.add(address);/*from ww  w.ja  v  a  2  s .c o m*/
            }
        }
        return fields;
    }
}

Related

  1. parse(String xml)
  2. parse(String xml)
  3. parse(String xml)
  4. parse(String xml)
  5. parseAccessNumber(String line)
  6. parseArg(String arg)
  7. parseArgs(String text)
  8. parseArgs(String[] args)
  9. parseArgs(String[] args)