Common operations

by NullQuery
Commonly used operations [More]
To download this library for your Linux/Mac installation, enter this on your command line:

DreamDownload byond://NullQuery.nq_commons##version=6

Emulator users, in the BYOND pager go to File | Open Location and enter this URL:


Version 1.4
Date added: Apr 19 2016
Last updated: Sep 8 2016
1 fan
Fork me on GitHub
This library contains a few common operations that may be useful to other projects. It is technically part of the sql4dm suite in that it imports the sql4dm support library and exposes functions to make it easier to work with databases.

Read the comments of the "" within for the various operations and their usage.

Supplements to this library are appreciated, if you have any suggestions feel free to create a post in the Feature Requests forum of this library.

Note that this library makes use of a DLL file for C/C++ operations. For this library no external libraries may be included in the DLL/SO file to make sure it's a light-weight library.

Both Windows and Linux are supported. Tested on Windows 10 Professional and CentOS 7 (64-bit multiarch)

Bug reports and suggestions may be reported to the appropriate forum.

Version 1.4
  • Added procs for converting from/to JSON with support to convert regular BYOND datums to JSON (and vice versa)
Version 1.3
  • New proc: CO.Repeat.
Version 1.2
  • Improvements to CO.Left, CO.Right, CO.BackwardsLeft and CO.BackwardsRight to make use of the new findlasttext/findlasttextEx procs.
  • New procs: CO.IndexAfterGroup and CO.IndexAfterGroupChar.
Version 1.1*
  • Adds a platform-independent random number generator, available under the /nq_rand type.
Version 1.0
  • Initial release.

* Marked versions require an update of the DLL/SO file in your project.


FKI: (Mar 21 2017, 4:12 pm)
To other users: Discovered a memory leak having to do with the Random() proc. Information can be found here.
FKI: (Jun 16 2016, 10:25 pm)
The number generator is very useful and efficient.