# String Encoding and Decoding >![](../../public_sys-resources/icon-note.gif) **NOTE:** >The initial APIs of this module are supported since API version 7. Newly added APIs will be marked with a superscript to indicate their earliest API version. ## Modules to Import ``` import util from '@ohos.util'; ``` ## Required Permissions None ## util.printf printf\(format: string, ...args: Object\[\]\): string Prints the input content in a formatted string. - Parameters
Callback, in which the first parameter indicates the cause of the rejection (the value is null if the promise has been resolved) and the second parameter indicates the resolved value. |
Function in the common error-first style (that is, (err, uses value) =>... is used as the last parameter) and the promise version. |
Encoding-related options, which include fatal and ignoreBOM. |