# A simple string builder
## sample
```python
from strbuilder import Builder, SurroundBuilder
condition = False
print(
Builder('base', separator='\n')
.write('header')
.write(Builder(separator=', ')
.write('aaa')
.write_if(condition, 'bbb')
.write_if(condition, 'ccc', or_else='ddd'))
.write(SurroundBuilder(surround='{}')
.write('surrounded!'))
.write('footer')
.build()
)
```
## output
```txt
base
header
aaa, ddd
{surrounded!}
footer
```
Raw data
{
"_id": null,
"home_page": "https://github.com/am230/strbuilder",
"name": "strbuilder",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "builder",
"author": "am230",
"author_email": "am.230@outlook.jp",
"download_url": "https://files.pythonhosted.org/packages/01/f5/c55949b37430b34249c47958971f0b5cb8a814d67fd2c5154efce2014ebd/strbuilder-1.1.3.tar.gz",
"platform": "any",
"description": "# A simple string builder\n\n## sample\n\n```python\nfrom strbuilder import Builder, SurroundBuilder\n\ncondition = False\n\nprint(\nBuilder('base', separator='\\n')\n.write('header')\n.write(Builder(separator=', ')\n.write('aaa')\n.write_if(condition, 'bbb')\n.write_if(condition, 'ccc', or_else='ddd'))\n.write(SurroundBuilder(surround='{}')\n.write('surrounded!'))\n.write('footer')\n.build()\n)\n```\n\n## output\n\n```txt\nbase\nheader\naaa, ddd\n{surrounded!}\nfooter\n```\n",
"bugtrack_url": null,
"license": "MIT Licence",
"summary": "A simple string builder",
"version": "1.1.3",
"split_keywords": [
"builder"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "01f5c55949b37430b34249c47958971f0b5cb8a814d67fd2c5154efce2014ebd",
"md5": "2eb0b8555642e09945df5bbbf8031fa8",
"sha256": "dcfa350436baaa11171e54423ff0bf027964e4bfc4c77dadb0ccc58eb432385f"
},
"downloads": -1,
"filename": "strbuilder-1.1.3.tar.gz",
"has_sig": false,
"md5_digest": "2eb0b8555642e09945df5bbbf8031fa8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2658,
"upload_time": "2023-03-16T00:37:51",
"upload_time_iso_8601": "2023-03-16T00:37:51.538448Z",
"url": "https://files.pythonhosted.org/packages/01/f5/c55949b37430b34249c47958971f0b5cb8a814d67fd2c5154efce2014ebd/strbuilder-1.1.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-03-16 00:37:51",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "am230",
"github_project": "strbuilder",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "strbuilder"
}