Add a string argument. The argument is represented as bulk string.

@param s the string.
@return the command args.
514770
public CommandArgs<K, V> add(String s) {

        singularArguments.add(StringArgument.of(s));
        return this;
    }
1240163
@Nonnull
  public DataTablesDom addCustom (@Nonnull @Nonempty final String sStr)
  {
    ValueEnforcer.notEmpty (sStr, "Str");
    _internalAdd (sStr);
    return this;
  }
841157
public void addAll(final String... args) {
        if (args != null) {
            for (String arg : args) {
                add(arg);
            }
        }
    }
531421
protected String createProcessCommand(String commandArguments)
    {
        //create command
        StringBuilder buffer=new StringBuilder(500);
        buffer.append("\"");
        buffer.append(this.fax4jExecutableFileLocation);
        buffer.append("\"");
        buffer.append(Fax4jExeConstants.SPACE_STR);
        buffer.append(commandArguments);
        String command=buffer.toString();

        return command;
    }
1095105
public static String[] tokenize(String args) {

    // Split the args string on whitespace boundaries accounting for quoted
    // strings.
    args = args.trim();
    List<String> argList = new ArrayList<>();
    String arg = "";
    char activeQuote = 0;
    for (int ii = 0; ii < args.length(); ii++) {
      char ch = args.charAt(ii);
      if ((ch == '\'') || (ch == '"')) {
        arg += ch;
        ii++;
        while ((ii < args.length()) && (args.charAt(ii) != ch)) {
          arg += args.charAt(ii++);
        }
        arg += ch;
      } else if (Character.isWhitespace(ch)) {
        // System.out.printf ("adding argument '%s'%n", arg);
        argList.add(arg);
        arg = "";
        while ((ii < args.length()) && Character.isWhitespace(args.charAt(ii))) {
          ii++;
        }
        if (ii < args.length()) {
          // Encountered a non-whitespace character.
          // Back up to process it on the next loop iteration.
          ii--;
        }
      } else { // must be part of current argument
        arg += ch;
      }
    }
    if (!arg.equals("")) {
      argList.add(arg);
    }

    String[] argsArray = argList.toArray(new String[argList.size()]);
    return argsArray;
  }
397450
public void append(String s) {
        int length = s.length();
        if (this.length + length > this.ch.length) {
            int newLength = this.ch.length*2;
            if (newLength < this.length + length + DEFAULT_SIZE)
                newLength = this.ch.length + length + DEFAULT_SIZE;
            char[] newch = new char[newLength];            
            System.arraycopy(this.ch, 0, newch, 0, this.length);
            this.ch = newch;
        }
        s.getChars(0, length, this.ch, this.length);
        this.length += length;
    }
144484
public final <T> void addArgument(Class<T> cls, String name)
    {
        if (map.containsKey(name))
        {
            throw new IllegalArgumentException(name+" is already added as option");
        }
        if (hasArrayArgument)
        {
            throw new IllegalArgumentException("no argument allowed after array argument");
        }
        types.add(cls);
        names.add(name);
        if (cls.isArray())
        {
            hasArrayArgument = true;
        }
    }
557497
public Map<SkbShellArgument, Object> getArgMap(SkbShellArgument[] arguments){
		Map<SkbShellArgument, Object> ret = new LinkedHashMap<SkbShellArgument, Object>();
		if(arguments!=null){
			for(Entry<String, String> entry : this.getArgMap().entrySet()){
				for(SkbShellArgument ssa : arguments){
					if(ssa.getKey().equals(entry.getKey())){
						switch(ssa.getType()){
							case Boolean:
								ret.put(ssa, Boolean.valueOf(entry.getValue()));
								break;
							case Double:
								ret.put(ssa, Double.valueOf(entry.getValue()));
								break;
							case Integer:
								ret.put(ssa, Integer.valueOf(entry.getValue()));
								break;
							case String:
								ret.put(ssa, entry.getValue());
								break;
							case ListString:
								String[] ar = StringUtils.split(entry.getValue(), ';');
								if(ar!=null){
									List<String> val = new ArrayList<>();
									for(String s : ar){
										val.add(s);
									}
									ret.put(ssa, val);
								}
								break;
							case ListInteger:
								String[] arInt = StringUtils.split(entry.getValue(), ';');
								if(arInt!=null){
									List<Integer> valInt = new ArrayList<>();
									for(String s : arInt){
										valInt.add(Integer.valueOf(s));
									}
									ret.put(ssa, valInt);
								}
								break;
							default:
								System.err.println("parser.getArgMap --> argument type not yet supported: " + ssa.getType());//TODO do not use syserr prints
								break;
						}
					}
				}
			}
		}
		return ret;
	}
888572
public static String sprintf( String s, int[] params ) {
        if ((s == null) || (params == null)) {
            return s;
        }
        StringBuffer result = new StringBuffer("");
        String[] ss = split(s);
        int p = 0;
        for( int i = 0; i < ss.length; i++ ) {
            char c = ss[i].charAt(0);
            String t = ss[i].substring(1);
            if (c == '+') {
                result.append(t);
            } else {
                int param = params[p];
                result.append(new Format(t).form(param));
                p++;
            }
        }
        return result.toString();
    }
762909
public Command[] toArgs(final String line) {
        if (line == null || line.isEmpty()) {
            throw new IllegalArgumentException("Empty command.");
        }

        final List<Command> commands = new ArrayList<>();
        final List<String> result = new ArrayList<>();
        final StringBuilder current = new StringBuilder();

        char waitChar = ' ';
        boolean copyNextChar = false;
        boolean inEscaped = false;
        for (final char c : line.toCharArray()) {
            if (copyNextChar) {
                current.append(c);
                copyNextChar = false;
            } else if (waitChar == c) {
                if (current.length() > 0) {
                    result.add(current.toString());
                    current.setLength(0);
                }
                waitChar = ' ';
                inEscaped = false;
            } else {
                switch (c) {
                    case '"':
                    case '\'':
                        if (!inEscaped) {
                            waitChar = c;
                            inEscaped = true;
                            break;
                        } else {
                            current.append(c);
                        }
                        break;

                    case '\\':
                        copyNextChar = true;
                        break;

                    case '|':
                        flush(commands, result, current);
                        break;

                    default:
                        current.append(c);
                }
            }
        }

        if (waitChar != ' ') {
            throw new IllegalStateException("Missing closing " + Character.toString(waitChar));
        }

        flush(commands, result, current);
        return commands.toArray(new Command[commands.size()]);
    }
390725
private static String varargsRoot(final String s) {
        return s.substring(0, s.length() - (VARARGS_SUFFIX.length()));
    }
1264100
public static String[] expandArguments(String[] args) throws Exception {
        List<String> options = new ArrayList<String>();

        for (int i = 0; i < args.length; i++) {
            if (args[i].equals(OPTIONS_FILE)) {
                if (i == args.length - 1) {
                    throw new Exception("Missing options file");
                }

                String fileName = args[++i];
                File optionsFile = new File(fileName);
                BufferedReader reader = null;
                StringBuilder buffer = new StringBuilder();
                try {
                    reader = new BufferedReader(new FileReader(optionsFile));
                    String nextLine = null;
                    while ((nextLine = reader.readLine()) != null) {
                        nextLine = nextLine.trim();
                        if (nextLine.length() == 0 || nextLine.startsWith("#")) {
                            // empty line or comment
                            continue;
                        }

                        buffer.append(nextLine);
                        if (nextLine.endsWith("\\")) {
                            if (buffer.charAt(0) == '\'' || buffer.charAt(0) == '"') {
                                throw new Exception(
                                        "Multiline quoted strings not supported in file("
                                        + fileName + "): " + buffer.toString());
                            }
                            // Remove the trailing back-slash and continue
                            buffer.deleteCharAt(buffer.length()  - 1);
                        } else {
                            // The buffer contains a full option
                            options.add(
                                    removeQuotesEncolosingOption(fileName, buffer.toString()));
                            buffer.delete(0, buffer.length());
                        }
                    }

                    // Assert that the buffer is empty
                    if (buffer.length() != 0) {
                        throw new Exception("Malformed option in options file("
                                + fileName + "): " + buffer.toString());
                    }
                } catch (IOException ex) {
                    throw new Exception("Unable to read options file: " + fileName, ex);
                } finally {
                    if (reader != null) {
                        try {
                            reader.close();
                        } catch (IOException ex) {
                            LOG.info("Exception while closing reader", ex);
                        }
                    }
                }
            } else {
                // Regular option. Parse it and put it on the appropriate list
                options.add(args[i]);
            }
        }

        return options.toArray(new String[options.size()]);
    }
1124268
@Configurable
  public void addArg(String arg)
  {
    if (_args == null)
      _args = new ArrayList<String>();
    
    _args.add(arg);
  }
721716
private void setString(String s) {
        _string.setLength(0);
        _string.append(s);
        _length = s.length();
    }
1017539
def InsertArg(self, string='', **unused_kwargs):
    """"""
    logging.debug('Storing Argument {0:s}'.format(string))

    # This expression is complete
    if self.current_expression.AddArg(string):
      self.stack.append(self.current_expression)
      self.current_expression = self.expression_cls()
      return self.PopState()
    return None
1287191
public void setArgs(String argString)
  {
    try {
      if (argString != null) {
        String []args = Pattern.compile("[\\s,]+").split(argString);

        _args = new ArrayList<String>();

        for (int i = 0; i < args.length; i++) {
          if (! args[i].equals(""))
            _args.add(args[i]);
        }
      }
    } catch (Exception e) {
      log.log(Level.WARNING, e.toString(), e);
    }
  }
1145248
public void writeMediumString( String s ) {
        final byte[] bytes = DynamicByteBufferHelper.bytes( s );
        this.addUnsignedShort( bytes.length );
        this.add( bytes );
    }