Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {
    /**
     * from "myFunction(arg1,arg2)", return "myFunction"
     */
    public static String getFunctionName(String tag) {
        return tag.substring(0, tag.indexOf('(')).trim();
    }

    /**
     * Trim an array of String (each element)
     */
    public static String[] trim(String[] strings) {
        for (int i = 0; i < strings.length; ++i)
            strings[i] = strings[i].trim();
        return strings;
    }
}