function CA_processArguments(aArguments) {
    if (aArguments.length < 2 || typeof aArguments[0] != "string") {
      return aArguments;
    }
    let args = Array.prototype.slice.call(aArguments);
    let format = args.shift();
    // Format specification regular expression.
    let processed = format.replace(ARGUMENT_PATTERN, function CA_PA_substitute(match, submatch) {
      switch (submatch) {
        case "o":
        case "s":
          return String(args.shift());
        case "d":
        case "i":
          return parseInt(args.shift());
        case "f":
          return parseFloat(args.shift());
        default:
          return submatch;
      };
    });
    args.unshift(processed);
    return args;
  }
/**
   * Process the console API call arguments in order to perform printf-like
   * string substitution.
   * TODO: object substitution should display an interactive property list (bug
   * 685815) and width and precision qualifiers should be taken into account
   * (bug 685813).
   *
   * @param mixed aArguments
   *        The arguments given to the console API call.
   **/
Process the console API call arguments in order to perform printf-like
string substitution.
TODO: object substitution should display an interactive property list (bug
685815) and width and precision qualifiers should be taken into account
(bug 685813).

@param mixed aArguments
The arguments given to the console API call.
Process the console API call arguments in order to perform printf - like string substitution . TODO : object substitution should display an interactive property list ( bug 685815 ) and width and precision qualifiers should be taken into account ( bug 685813 ) . @param mixed aArguments The arguments given to the console API call .
function CA_processArguments(aArguments) {
    if (aArguments.length < 2 || typeof aArguments[0] != "string") {
      return aArguments;
    }
    let args = Array.prototype.slice.call(aArguments);
    let format = args.shift();
    let processed = format.replace(ARGUMENT_PATTERN, function CA_PA_substitute(match, submatch) {
      switch (submatch) {
        case "o":
        case "s":
          return String(args.shift());
        case "d":
        case "i":
          return parseInt(args.shift());
        case "f":
          return parseFloat(args.shift());
        default:
          return submatch;
      };
    });
    args.unshift(processed);
    return args;
  }
function CA_processArguments ( aArguments ) { if ( aArguments . length < 2 || typeof aArguments [ 0 ] != "string" ) { return aArguments ; } let args = Array . prototype . slice . call ( aArguments ) ; let format = args . shift ( ) ; let processed = format . replace ( ARGUMENT_PATTERN , function CA_PA_substitute ( match , submatch ) { switch ( submatch ) { case "o" : case "s" : return String ( args . shift ( ) ) ; case "d" : case "i" : return parseInt ( args . shift ( ) ) ; case "f" : return parseFloat ( args . shift ( ) ) ; default : return submatch ; } ; } ) ; args . unshift ( processed ) ; return args ; }
Process the console API call arguments in order to perform printf-like
 string substitution.
Process the console API call arguments in order to perform printf - like string substitution .
// Format specification regular expression.