---
layout: docs
title: addf
id: class.Facebook.HackCodegen.BaseCodeBuilder.addf
docid: class.Facebook.HackCodegen.BaseCodeBuilder.addf
permalink: /docs/reference/class.Facebook.HackCodegen.BaseCodeBuilder.addf/
---
# Facebook\\HackCodegen\\BaseCodeBuilder::addf()




Add code to the buffer, using a % placeholder format string




``` Hack
final public function addf(
  HH\Lib\Str\SprintfFormatString $code,
  mixed ...$args,
): this;
```




## Parameters




- ` HH\Lib\Str\SprintfFormatString $code `
- ` mixed ...$args `




## Returns




+ ` this `