https://github.com/burner/std.rcstring
A reference counted string implementation for D's build in string construct.
https://github.com/burner/std.rcstring
Last synced: 3 months ago
JSON representation
A reference counted string implementation for D's build in string construct.
- Host: GitHub
- URL: https://github.com/burner/std.rcstring
- Owner: burner
- Created: 2015-08-18T15:15:31.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2019-09-12T09:39:11.000Z (over 5 years ago)
- Last Synced: 2025-01-23T18:51:20.331Z (5 months ago)
- Language: D
- Size: 21.5 KB
- Stars: 9
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-d - std.rcstring - A reference counted string implementation for D's build in string construct (Containers / Bare metal / kernel development)
README
# RCString a reference counted string
The module rcstring provides everything necessary to replace D's build-in
strings with a reference counted version. It should be as easy as replacing
all occurrences of the keyword string with String.Additional, to String there are WString and DString defined in this module.
```d
String str = "Hello World";
assert(str.front == "H");
assert(str.back == "d");auto slice = str[1 .. 5];
assert(slice == "ello");slice.popFront();
assert(slice == "llo");```