Common operations

by NullQuery
Commonly used operations
ID:2072708
 
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 "nq_commons.dm" 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.

Changelog:
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.
The number generator is very useful and efficient.
To other users: Discovered a memory leak having to do with the Random() proc. Information can be found here.