Here you can find the source of splitAt(final String input, final String seperator)
Parameter | Description |
---|---|
input | a parameter |
seperator | a parameter |
static public ArrayList<String> splitAt(final String input, final String seperator)
//package com.java2s; /* Copyright (c) 2014 geOps - www.geops.de. All rights reserved. * * This code is licensed under the GPL 2.0 license, available at the root * application directory.// w w w.j a v a 2 s .c om */ import java.util.ArrayList; public class Main { /** * Split a string at a separator and return the unique trimmed entries * from the string. * * @param input * @param seperator * @return */ static public ArrayList<String> splitAt(final String input, final String seperator) { final String[] parts = input.split(seperator); final ArrayList<String> result = new ArrayList<String>(); for (final String part : parts) { final String partTrimmed = part.trim(); if (!partTrimmed.equals("")) { result.add(partTrimmed); } } return result; } }