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

	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

Authors:
  • Su
Dependencies:
none
Versions:
1.1.0 2022-Jan-12
1.0.0 2022-Jan-10
~main 2022-Jan-12
Show all 3 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 1 downloads this month

  • 1 downloads total

Score:
0.4
Short URL:
fixedstring.dub.pm