---
layout: docs
title: detach
id: class.Facebook.HackCodegen._Private.StrBuffer.detach
docid: class.Facebook.HackCodegen._Private.StrBuffer.detach
permalink: /docs/reference/class.Facebook.HackCodegen._Private.StrBuffer.detach/
---
# Facebook\\HackCodegen\\_Private\\StrBuffer::detach()




Return the build string




``` Hack
public function detach(): string;
```




This will only work exactly once.




## Returns




* ` string `