Several methods such as `Copy()`, `Remove()`, `ChangeFormatting()` and
several others have had similar errors related to how their input
parameters defined range when specified out-of-bounds.
This patch should fix them.
Previously one could only read formatted data directly from `string`s.
This patch adds another method `AppendFormatted()` for appending a
`Text`/`MutableText`, while parsing its data like a formatted string.
`Copy()` and `MutableCopy()` methods for `Text` incorrectly handled
negative arguments in some cases. They were fixed and appropriate tests
were added.
Make decoder work with byte arrays containing a single complete text,
instead of byte streams with several separate texts.
Moved codecs into "Text" category.
Added more conversion methods from primitive types (`bool`, `byte`,
`int`, `float`) into `Text` and `MutableText` into the standart
`TextAPI`. Made `JSONAPI` use these methods instead.
This is a giga commit, something that should not really be done with
git, but I messed up.
This commit brings a great amount of changes, most important is
reworking `TextAPI` and alsmost complete replacement of `string` with
`Text`/`MutableText`.
Another huge change is introduction of command system that allows to
define commands in a centralized manner, handles auto-parsing of
their parameters and auto generates help info.
Lastly, JSON data types were replaced with new
`DynamicArray`/`AssociativeArray` that are better designed and more
generic.