Java String Tokenize getFileName(StringTokenizer s)

Here you can find the source of getFileName(StringTokenizer s)

Description

Gets the name for the file, eliminating "" and skiping "="

License

Open Source License

Parameter

Parameter Description
s Token

Return

The name of the file

Declaration

public static String getFileName(StringTokenizer s) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.util.*;

public class Main {
    /**/*from   w w  w. jav  a 2s .co  m*/
     * <p>
     * Gets the name for the file, eliminating "" and skiping "="
     * </p>
     * @param s     Token
     * @return      The name of the file
     */
    public static String getFileName(StringTokenizer s) {
        String val = s.nextToken(); // skip "="
        val = s.nextToken();
        val = val.replace('"', ' ').trim();
        return val; // Only takes first name, second is ignored
    }
}

Related

  1. escapedTokens(String s, char separator)
  2. extractTokens(String strStartToken, String strEndToken, String strExpression)
  3. extractTokens(String text, String delim)
  4. getAllTokens(final String string)
  5. getCommandTokens(String commandString)
  6. getNameTokens(final String names)
  7. getParamFloat(StringTokenizer s)
  8. getParamString(StringTokenizer s)
  9. getSQLTokens(String query)