=pod =encoding utf8 =head1 NAME Muldis::D::Core::Blob - Muldis D bit string operators =head1 VERSION This document is Muldis::D::Core::Blob version 0.148.0. =head1 PREFACE This document is part of the Muldis D language specification, whose root document is L; you should read that root document before you read this one, which provides subservient details. Moreover, you should read the L document before this current document, as that forms its own tree beneath a root document branch. =head1 DESCRIPTION This document describes essentially all of the core Muldis D operators that are specific to the core data type C, essentially all the generic ones that a typical programming language should have. I =head1 FUNCTIONS IMPLEMENTING VIRTUAL ORDERED FUNCTIONS =head2 sys.std.Core.Blob.order C<< function order (Order <-- topic : Blob, other : Blob, misc_args? : Tuple, is_reverse_order? : Bool) implements sys.std.Core.Ordered.order {...} >> This is a (total) C function specific to C. Its only valid C argument is C. =head1 FUNCTIONS IMPLEMENTING VIRTUAL STRINGY FUNCTIONS =head2 sys.std.Core.Blob.catenation C<< function catenation (Blob <-- topic? : array_of.Blob) implements sys.std.Core.Stringy.catenation {...} >> This function results in the catenation of the N element values of its argument; it is a reduction operator that recursively takes each consecutive pair of input values and catenates (which is associative) them together until just one is left, which is the result. If C has zero values, then C results in the empty string value, which is the identity value for catenation. =head2 sys.std.Core.Blob.replication C<< function replication (Blob <-- topic : Blob, count : NNInt) implements sys.std.Core.Stringy.replication {...} >> This function results in the catenation of C instances of C. =head1 GENERIC FUNCTIONS FOR BLOBS These functions implement commonly used binary string operations. =head2 sys.std.Core.Blob.len_in_bits C<< function len_in_bits (NNInt <-- topic : Blob) {...} >> This function results in the length of its argument in bits. =head2 sys.std.Core.Blob.len_in_octets C<< function len_in_octets (NNInt <-- topic : OctetBlob) {...} >> This function results in the length of its argument in octets. =head2 sys.std.Core.Blob.has_substr_bits C<< function has_substr_bits (Bool <-- look_in : Blob, look_for : Blob, fixed_start? : Bool, fixed_end? : Bool) {...} >> This function results in C iff its C argument is a substring of its C argument as per the optional C and C constraints, and C otherwise. If C or C are C, then C must occur right at the start or end, respectively, of C in order for C to results in C; if either flag is C, its additional constraint doesn't apply. Each of the C parameters is optional and defaults to C if no explicit argument is given to it. =head2 sys.std.Core.Blob.has_not_substr_bits C<< function has_not_substr_bits (Bool <-- look_in : Blob, look_for : Blob, fixed_start? : Bool, fixed_end? : Bool) {...} >> This function is exactly the same as C except that it results in the opposite boolean value when given the same arguments. =head2 sys.std.Core.Blob.has_substr_octets C<< function has_substr_octets (Bool <-- look_in : OctetBlob, look_for : OctetBlob, fixed_start? : Bool, fixed_end? : Bool) {...} >> This function is exactly the same as C except that its main arguments are C and it only looks for substring matches on whole-octet boundaries of the C bit string. =head2 sys.std.Core.Blob.has_not_substr_octets C<< function has_not_substr_octets (Bool <-- look_in : OctetBlob, look_for : OctetBlob, fixed_start? : Bool, fixed_end? : Bool) {...} >> This function is to C as C is to C. =head2 sys.std.Core.Blob.not C<< function not (Blob <-- topic : Blob) {...} >> This function results in the bitwise I of its argument. =head2 sys.std.Core.Blob.and C<< function and (Blob <-- topic : set_of.Blob) {...} >> This function is a reduction operator that recursively takes each pair of its N input element values and does a bitwise I (which is commutative, associative, and idempotent) on them until just one is left, which is the function's result. This function's argument values must all be of the same length in bits, that length being part of the argument's declared type (that is, C subtype) definition, and that is also the length in bits of the function's result. If C has zero values, then this function will fail. Note that, conceptually C I have an identity value which could be this function's result when C has zero values, which is an appropriate-length string of identity/1 valued bits; however, since a C with zero values wouldn't know the length in question, it seems the best alternative is to require invoking code to work around the limitation somehow, which might mean it will supply the identity value explicitly as an extra C element. =head2 sys.std.Core.Blob.or C<< function or (Blob <-- topic : set_of.Blob) {...} >> This function is the same as C but that it recursively does a bitwise inclusive-or rather than a bitwise I, and its conceptual identity value is composed of zero valued bits. =head2 sys.std.Core.Blob.xor C<< function xor (Blob <-- topic : bag_of.Blob) {...} >> This function is the same as C but that it recursively does a bitwise exclusive-or rather than a bitwise inclusive-or. =head1 SEE ALSO Go to L for the majority of distribution-internal references, and L for the majority of distribution-external references. =head1 AUTHOR Darren Duncan (C) =head1 LICENSE AND COPYRIGHT This file is part of the formal specification of the Muldis D language. Muldis D is Copyright © 2002-2011, Muldis Data Systems, Inc. See the LICENSE AND COPYRIGHT of L for details. =head1 TRADEMARK POLICY The TRADEMARK POLICY in L applies to this file too. =head1 ACKNOWLEDGEMENTS The ACKNOWLEDGEMENTS in L apply to this file too. =cut