Here you can find the source of parseExperimentName(String name)
Parameter | Description |
---|---|
name | the name |
public static String parseExperimentName(String name)
//package com.java2s; //License from project: LGPL import java.util.Scanner; public class Main { /**/* ww w. jav a 2s.co m*/ * Parses the experiment name. * * @param name the name * @return the string */ public static String parseExperimentName(String name) { Scanner scanner = new Scanner(name); StringBuilder csvName = new StringBuilder(); scanner.useDelimiter("_"); for (int i = 0; i < 4; i++) { if (scanner.hasNext()) { csvName.append(scanner.next() + ","); } else { csvName.append(","); } } scanner.close(); return csvName.toString(); } }