<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [NS](./bitburner.ns.md) &gt; [sprintf](./bitburner.ns.sprintf.md)

## NS.sprintf() method

Format a string.

**Signature:**

```typescript
sprintf(format: string, ...args: any[]): string;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

format


</td><td>

string


</td><td>

String to format.


</td></tr>
<tr><td>

args


</td><td>

any\[\]


</td><td>

Formatting arguments.


</td></tr>
</tbody></table>

**Returns:**

string

Formatted text.

## Remarks

RAM cost: 0 GB

see: https://github.com/alexei/sprintf.js

