fixedstring 1.1.0
a @safe, @nogc-compatible template string type
To use this package, run the following command in your project's root directory:
Manual usage
Put the following dependency into your project's dependences section:
fixedstring
a templated fixed-length array of char
s, compatible with @safe
, @nogc
, and nothrow
code.
example
void main() @safe @nogc nothrow
{
FixedString!14 foo = "clang";
foo[0] = 'd';
foo ~= " is cool";
assert (foo == "dlang is cool");
foo.length = 9;
auto bar = FixedString!"neat";
assert (foo ~ bar == "dlang is neat");
// wchars and dchars are also supported
assert(FixedString!(5, wchar)("áéíóú") == "áéíóú");
// in fact, any type is:
immutable int[4] intArray = [1, 2, 3, 4];
assert(FixedString!(5, int)(intArray) == intArray);
}
licence
AGPL-3.0 or later
- Registered by Susan Tootill
- 1.1.0 released 2 years ago
- Moth-Tolias/fixedstring
- AGPL-3.0 or later
- Copyright © 2021, Su
- Authors:
- Dependencies:
- none
- Versions:
-
2.0.1 2022-May-24 2.0.0 2022-May-22 1.2.0 2022-Apr-12 1.1.0 2022-Jan-12 1.0.0 2022-Jan-10 - Download Stats:
-
-
0 downloads today
-
0 downloads this week
-
0 downloads this month
-
26 downloads total
-
- Score:
- 0.8
- Short URL:
- fixedstring.dub.pm