Exception, to be thrown when setMemberByName fails for some given reason.
Iterates an associative array and deletes invalid entries, either if the value is in a default .init state or as per the optionally passed predicate.
Inspects a passed struct or class for members whose values match that of the passed token. Matches members are set to a replacement value, which is an optional parameter that defaults to the .init value of the token's type.
Given a struct/class object, sets one of its members by its string name to a specified value. Overload that takes the value as a string and tries to convert it into the target type.
Given a struct/class object, sets one of its members by its string name to a specified value. Overload that takes a value of the same type as the target member, rather than a string to convert. Integer promotion applies.
Public import of lu.uda.Separator.
struct Foo { string nickname; string address; } Foo foo; foo.setMemberByName("nickname", "foobar"); foo.setMemberByName("address", "subdomain.address.tld"); assert(foo.nickname == "foobar"); assert(foo.address == "subdomain.address.tld"); foo.replaceMembers("subdomain.address.tld", "foobar"); assert(foo.address == "foobar"); foo.replaceMembers("foobar", string.init); assert(foo.nickname.length == 0); assert(foo.address.length == 0);
This module contains functions that in some way or another manipulates struct and class instances, as well as (associative) arrays.