Evo C++ Library v0.5.1
Slicing

Slicing is a way for a container to reference a subset (a "slice") of sequential data.

Containers that support Slicing: List, String, MapList

Example:

#include <evo/string.h>
#include <evo/io.h>
using namespace evo;
static Console& c = con();
int main() {
// Reference a string literal -- no memory allocated here
String str("_test_");
// Remove (slice out) underscore characters, same literal is still referenced
str.slice(1, 4);
// Append a space and number
// - This is a write operation (modifier) so will allocate a buffer to hold "test 123" -- sliced out data is discarded
str << " 123";
// Prints: test 123
c.out << str << NL;
return 0;
}