Welcome to DData
Project Information
Name | DData |
Category | Server Resources |
Status | 4 - Beta |
Short Description | String to Array parser module - D1 std2 |
Long Description | DData consists of a single module containing a toArray template. It takes an array in string form and return the corresponding array. As long as the base-type is supported by std2.conv.to and the depth of the array won't crash the compiler, it should work. |
Forum | /forums/viewforum.php?f=245 |
Home Page |
Description
DData consists of a single module containing a toArray template full of template and string mixin fun.
It takes an array in string form and return the corresponding array.
As long as the base-type is supported by std2.conv.to and the depth of the array won't crash the compiler, it should work.
At the moment it depends on:
std2.conv.to
std2.traits.isnumeric
from:
---
Can't std.conv already do this?
Usage
unittest() { writefln("DData UnitTest..."); int[][][] ia = [ [[1,2],[3,4],[5]] , [[6],[],[7,8,9]] , [[]] ]; char[] s = to!(char[])(ia); int[][][] ia2; ia2 = toArray!(typeof(ia2))(s); assert( ia == ia2); writefln("Done!"); }
Limitations
At the moment it is not made to handle arrays of strings also, its input is char[].
Starting Points
- TracGuide -- Built-in Documentation
For a complete list of local wiki pages, see TitleIndex.