Java CSV from csvTagsToList(String tags)

Here you can find the source of csvTagsToList(String tags)

Description

csv Tags To List

License

Apache License

Parameter

Parameter Description
tags a parameter

Return

List of tags

Declaration

public static List<String> csvTagsToList(String tags) 

Method Source Code

//package com.java2s;
// Licensed to the Apache Software Foundation (ASF) under one

import java.util.ArrayList;

import java.util.List;

public class Main {
    /**// w  w w.  j  a v a2  s . c o  m
     * @param tags
     * @return List of tags
     */
    public static List<String> csvTagsToList(String tags) {
        List<String> tagsList = new ArrayList<String>();

        if (tags != null) {
            String[] tokens = tags.split(",");
            for (int i = 0; i < tokens.length; i++) {
                tagsList.add(tokens[i].trim());
            }
        }

        return tagsList;
    }
}

Related

  1. convertStringListToCSV(List inputStringList)
  2. convertStringListToCSV(List source)
  3. countMaxColumnSizeByArray(List csvs)
  4. csv2list(String csvString)
  5. csvList(String _text, Integer[] _idx_ret)
  6. csvToList(String csv)
  7. csvToList(String csv)
  8. CSVToList(String str)
  9. formatAsCsv(List stringList)