https://github.com/davidanthoff/stringbuilders.jl
A StringBuilder type for julia
https://github.com/davidanthoff/stringbuilders.jl
Last synced: over 1 year ago
JSON representation
A StringBuilder type for julia
- Host: GitHub
- URL: https://github.com/davidanthoff/stringbuilders.jl
- Owner: davidanthoff
- License: other
- Created: 2018-02-13T00:43:26.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-01-12T22:19:54.000Z (over 1 year ago)
- Last Synced: 2025-03-12T12:39:33.934Z (over 1 year ago)
- Language: Julia
- Homepage:
- Size: 1.38 MB
- Stars: 20
- Watchers: 2
- Forks: 7
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS.md
- License: LICENSE.md
Awesome Lists containing this project
README
# StringBuilders
[](http://www.repostatus.org/#active)

[](https://codecov.io/gh/davidanthoff/StringBuilders.jl)
## Overview
A simple type for building up ``String``s. Use as follows:
````julia
using StringBuilders
sb = StringBuilder()
append!(sb, "First string")
append!(sb, "Second string")
s = String(sb)
````
The advantage of StringBuilders.jl over using `IOBuffer` is in the API. Some may find The higher-level StringBuilders.jl API easier to use. For comparison, the example above using `IOBuffer` would be
```julia
io = IOBuffer()
write(io, "First string")
write(io, "Second String")
s = String(take!(io))
close(io)
```