Java String Substritute substituteCommandLine(String[] parsedCommandLine, String file1Name, String file2Name, String display1, String display2)

Here you can find the source of substituteCommandLine(String[] parsedCommandLine, String file1Name, String file2Name, String display1, String display2)

Description

substitute Command Line

License

Apache License

Declaration

static String[] substituteCommandLine(String[] parsedCommandLine, String file1Name, String file2Name,
            String display1, String display2) 

Method Source Code

//package com.java2s;
//   Licensed under the Apache License, Version 2.0 (the "License");

public class Main {
    static String[] substituteCommandLine(String[] parsedCommandLine, String file1Name, String file2Name,
            String display1, String display2) {
        for (int i = 0; i < parsedCommandLine.length; i++) {
            if (parsedCommandLine[i].equals("file1Name")) {
                parsedCommandLine[i] = file1Name;
            } else if (parsedCommandLine[i].equals("file2Name")) {
                parsedCommandLine[i] = file2Name;
            } else if (parsedCommandLine[i].equals("display1")) {
                parsedCommandLine[i] = display1;
            } else if (parsedCommandLine[i].equals("display2")) {
                parsedCommandLine[i] = display2;
            }/*  w  ww.  j a v a2s  .c  o  m*/
        }
        return parsedCommandLine;
    }
}

Related

  1. substitute(String strSource, String strValue, String strBookmark)
  2. substitute(String template, String[] values)
  3. substitute(String txt, String pattern, String sub)
  4. substituteAll(String regexp, String subst, String target)
  5. substituteBlanks(String s, String subst)
  6. substituteEnvironmentVariables(String str, String prefix, String suffix)
  7. substituteHex(String aString)
  8. substituteInvalidChars(String str)
  9. substituteJobID(String path)