fixedstring 2.0.1

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 chars, 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;

	immutable 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);
}

read the documentation for more info!

licence

AGPL-3.0 or later

Authors:
  • Su
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
Show all 6 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 26 downloads total

Score:
0.8
Short URL:
fixedstring.dub.pm