MCPcopy Create free account
hub / github.com/TheCyaniteProject/exit_code_java / formatCommand

Method formatCommand

src/main/java/exitcode/Console.java:343–360  ·  view source on GitHub ↗
(String commandName)

Source from the content-addressed store, hash-verified

341 }
342
343 private ArrayList<String> formatCommand(String commandName) {
344 String command;
345 String body;
346 ArrayList<String> output = new ArrayList<>();
347 if (!commandName.contains(" ")) {
348 command = commandName.trim();
349 body = "null";
350 } else {
351 command = commandName.split(" ", 2)[0];
352 body = commandName.split(" ", 2)[1];
353 if (body.trim().equals("")) {
354 body = "null";
355 }
356 }
357 output.add(command);
358 output.add(body);
359 return output;
360 }
361
362}

Callers 1

runCommandMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected