Add ns.printf function

Behaviour is consistent with that of tprintf versus tprint and
should be equivalent to ns.print(ns.sprintf(...))
This commit is contained in:
Terrana
2022-01-21 11:34:10 +00:00
parent 07fe3c1906
commit f2c4109211
3 changed files with 18 additions and 0 deletions

View File

@@ -4460,6 +4460,17 @@ export interface NS extends Singularity {
*/
print(...args: any[]): void;
/**
* Prints a formatted string to the scripts logs.
* @remarks
* RAM cost: 0 GB
*
* see: https://github.com/alexei/sprintf.js
* @param format - format of the message
* @param args - Value(s) to be printed.
*/
printf(format: string, ...args: any[]): void;
/**
* Prints one or more values or variables to the Terminal.
* @remarks