ydlib 1.3.10

A collection of utils


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:

ydlib

Yeti's D Library

Some useful stuff I made for D

Links:

Install

dub add ydlib

Libraries

ydlib.serialise

TODO: Explain this completely untested library

ydlib.sortedMap

This module gives you a sorted map class

Example

import std.stdio;
import ydlib.sortedMap;

void main() {
	// first int is key type
	// second is value type
	auto map = new SortedMap!(int, int)();

	map[0] = 6;
	map[2] = 9;
	map[1] = 0;

	foreach (key, ref value ; map) {
		writefln("%d: %d", key, value);
	}
}

ydlib.common

Contains common functions that are missing from Phobos

Has a variety of functions, best to look at the documentation

ydlib.list

Contains a doubly linked list class

Example

import std.stdio;
import ydlib.list;

void main() {
	auto myList = new List!int();

	myList ~= 1;
	myList ~= 2;
	myList ~= 3;

	foreach (num ; myList) {
		if (num.value % 2 == 0) {
			num.InsertAfter(5);
		}
	}

	foreach (num ; myList) {
		writeln(num.value);
	}
}
Authors:
  • yeti0904
Dependencies:
none
Versions:
1.3.10 2023-Oct-15
1.3.9 2023-Oct-15
1.3.8 2023-Oct-15
1.3.7 2023-Oct-15
1.3.6 2023-Oct-15
Show all 17 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 257 downloads total

Score:
0.6
Short URL:
ydlib.dub.pm