Writes newline-terminated formatted string to reporter output stream.

@private
@param {string} format - `printf`-like format string
@param {...*} [varArgs] - Format string arguments
198494
function println(format, varArgs) {
  var vargs = Array.from(arguments);
  vargs[0] += '\n';
  process.stdout.write(sprintf.apply(null, vargs));
}
1101670
function compile (format) {
  if (typeof format !== 'string') {
    throw new TypeError('argument format must be a string')
  }

  var fmt = String(JSON.stringify(format))
  var js = '  "use strict"\n  return ' + fmt.replace(/:([-\w]{2,})(?:\[([^\]]+)\])?/g, function (_, name, arg) {
    var tokenArguments = 'req, res'
    var tokenFunction = 'tokens[' + String(JSON.stringify(name)) + ']'

    if (arg !== undefined) {
      tokenArguments += ', ' + String(JSON.stringify(arg))
    }

    return '" +\n    (' + tokenFunction + '(' + tokenArguments + ') || "-") + "'
  })

  // eslint-disable-next-line no-new-func
  return new Function('tokens, req, res', js)
}
575453
private static void display(String format, Object... args) {
        System.out.println(MessageFormatter.arrayFormat(format, args).getMessage());
    }
745641
function format( value ) {
      // value was wrapped in array for parsing:
      try {
         return value.map( function( item ) {
            return JSON.stringify( item, null, 3 ).replace( NEWLINE_MATCHER, '\n' );
         } ).join( ',\n' );
      }
      catch( e ) {
         // value not JSON-compatible
         return value;
      }
   }
110387
function print(str, indent, inline) {
        var lines = str.split('\n');

        for(var i=0; i<lines.length; i++) {
            if(lines[i]) {
                if((inline && i > 0) || !inline) {
                    for(var j=0; j<indent; j++) {
                        process.stdout.write(' ');
                    }
                }
            }

            if(i === lines.length-1) {
                process.stdout.write(lines[i]);
            }
            else {
                process.stdout.write(lines[i] + '\n');
            }
        }
    }
123292
function format(str, ...args) {
  return !args.length ? str : str.replace(/%[a-zA-Z]/, (match) => args.shift() || match);
}
922176
def write(self, msg, style_func=None, ending=None, stream=None):
        
        if stream is None:
            stream = self.stdout
        if OutputWrapper is None:
            ending = "\n" if ending is None else ending
            msg += ending
            stream.write(msg)
        else:
            stream.write(msg, style_func=style_func, ending=ending)
401608
function format(obj)
{
  var output;

  if (typeOf(obj) == 'object' || typeOf(obj) == 'array' || typeOf(obj) == 'null')
  {
    output = JSON.stringify(obj);
  }
  else if (typeOf(obj) != 'undefined')
  {
    output = obj.toString();
  }
  else
  {
    output = '';
  }

  return output;
}
776919
public static void logPrintf(String format, String... v) {
        if (enableLog) {
            String tmp = String.format(format, (Object[]) v);
            logger.log(Level.INFO, tmp);
        }
    }
1206915
public void v(String format, Object... args) {
    println(LogLevel.VERBOSE, format, args);
  }
1269868
function format(f) {
    "use strict";
    var i = 1;
    var args = arguments;
    var len = args.length;
    var str = String(f).replace(/%[sdj%]/g, function _replace(x) {
        if (i >= len) return x;
        switch (x) {
        case '%s':
            return String(args[i++]);
        case '%d':
            return Number(args[i++]);
        case '%j':
            return JSON.stringify(args[i++]);
        case '%%':
            return '%';
        default:
            return x;
        }
    });
    for (var x = args[i]; i < len; x = args[++i]) {
        if (x === null || typeof x !== 'object') {
            str += ' ' + x;
        } else {
            str += '[obj]';
        }
    }
    return str;
}
1020380
public static void printInfo(Object caller, String format, Object... args)
	{
		Object msg = String.format(format, args);
		
		printInfo(caller,msg);
	}
128834
@JSFunction
    public static void writeLine(Context cx, Scriptable thisObj,
                                            Object[] args, Function funObj)
        throws IOException
    {
        write0(thisObj, args, true);
    }
510217
def write(self, string, *args, **kwargs):
        
        if self.on_new_line:
            self.on_new_line = False  # We're not on a new line anymore
            # If the string was not empty, indent; Else probably a new line
            if string.strip():
                self.indent()

        if args or kwargs:
            self.out_stream.write(string.format(*args, **kwargs))
        else:
            self.out_stream.write(string)
297402
@Override
    public IndentedPrintWriter printf(String format, Object... args) {
        super.format(format, args);
        return this;
    }
1091441
@javax.annotation.Nonnull
  public String format(@javax.annotation.Nonnull String fmt, @javax.annotation.Nonnull Object... args) {
    return 0 == args.length ? fmt : String.format(fmt, args);
  }
1174176
function (format) {
            _validFormat(format);
    
            var m = _regexDecFormat.exec(format);
            if (m !== null)
                return (  (typeof m[3] === 'string') ? m[3].length : 0 )
                     + ( (m[4] === '%')              ? 2           : 0 );
            
            else {
                m = _regexFracFormat.exec(format);
                if (m !== null)
                    return _getPrecision(1 / parseInt(m[2], 10));
            }
            
            throw "IllegalArgumentException: format is not recognized (" + format + ")";
        }