NAME
Language::MuldisD::Ext::Text - Muldis D extension for character string data types and operators
VERSION
This document is Language::MuldisD::Ext::Text version 0.20.0.
PREFACE
This document is part of the Muldis D language specification, whose root document is Language::MuldisD; you should read that root document before you read this one, which provides subservient details.
DESCRIPTION
Muldis D has a mandatory core set of system-defined (eternally available) entities, which is referred to as the Muldis D core or the core; they are the minimal entities that all Muldis D implementations need to provide; they are mutually self-describing and are used to bootstrap the language; any entities outside the core, called Muldis D extensions, are non-mandatory and are defined in terms of the core or each other, but the reverse isn't true.
This current Text document describes the system-defined Muldis D Text Extension, which consists of character string data types and operators, essentially all the generic ones that a typical programming language should have, but for the bare minimum needed for bootstrapping Muldis D, which are defined in the language core instead.
This current document does not describe the polymorphic operators that all types, or some types including core types, have defined over them; said operators are defined once for all types in Language::MuldisD::Core.
This documentation is pending.
TYPE SUMMARY
Also for convenience are the regular set|maybe|seq|bag types sys.Text.Spec.(Set|Maybe|Seq|Bag)OfText.
This documentation is pending.
SYSTEM-DEFINED TEXT-CONCERNING DATA TYPES
sys.Text.Spec.(Set|Maybe|Seq|Bag)OfText-
A
(Set|Maybe|Seq|Bag)OfTextis a completely defined proper subtype of(Set|Maybe|Seq|Bag)whosevalueattribute has a declared type of aTextsubtype.
SYSTEM-DEFINED TEXT-CONCERNING FUNCTIONS
These functions implement commonly used character string operations.
function sys.Text.Text.catenation result Text params { topic(SeqOfText) }-
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
topichas zero values, thencatenateresults in the empty string value, which is the identity value for catenate. function sys.Text.Text.repeat result Text params { topic(Text), count(UInt) }-
This function results in the catenation of
countinstances oftopic. function sys.Text.Text.length_in_nfd_graphs result UInt params { topic(Text) }-
This function results in the length of its argument in Unicode Normalization Form D graphemes.
function sys.Text.Text.length_in_nfc_graphs result UInt params { topic(Text) }-
This function results in the length of its argument in Unicode Normalization Form C graphemes.
function sys.Text.Text.length_in_nfd_codes result UInt params { topic(Text) }-
This function results in the length of its argument in Unicode Normalization Form D code points.
function sys.Text.Text.length_in_nfc_codes result UInt params { topic(Text) }-
This function results in the length of its argument in Unicode Normalization Form C code points.
function sys.Text.Text.is_substr result Bool params { look_in(Text), look_for(Text), fixed_start(Bool), fixed_end(Bool) }-
This function results in
Bool:trueiff itslook_forargument is a substring of itslook_inargument as per the optionalfixed_startandfixed_endconstraints, andBool:falseotherwise. Iffixed_startorfixed_endareBool:true, thenlook_formust occur right at the start or end, respectively, oflook_inin order forcontainsto result inBool:true; if either flag isBool:false, its additional constraint doesn't apply. function sys.Text.Text.is_not_substr result Bool params { look_in(Text), look_for(Text), fixed_start(Bool), fixed_end(Bool) }-
This function is exactly the same as
sys.Text.Text.is_substrexcept that it results in the opposite boolean value when given the same arguments. function sys.Text.Text.case_folded_to_upper result Text { topic(Text) }-
This function results in the transformation of its argument where any letters considered to be (small) lowercase are folded to (capital) uppercase.
function sys.Text.Text.case_folded_to_lower result Text { topic(Text) }-
This function results in the transformation of its argument where any letters considered to be (capital) uppercase are folded to (small) lowercase.
function sys.Text.Text.whitespace_trimmed result Text { topic(Text) }-
This function results in the value of its argument but that any leading or trailing whitespace characters are trimmed.
SEE ALSO
Go to Language::MuldisD for the majority of distribution-internal references, and Language::MuldisD::SeeAlso for the majority of distribution-external references.
AUTHOR
Darren Duncan (perl@DarrenDuncan.net)
LICENSE AND COPYRIGHT
This file is part of the formal specification of the Muldis D language.
Muldis D is Copyright © 2002-2008, Darren Duncan.
See the LICENSE AND COPYRIGHT of Language::MuldisD for details.
ACKNOWLEDGEMENTS
The ACKNOWLEDGEMENTS in Language::MuldisD apply to this file too.
2 POD Errors
The following errors were encountered while parsing the POD:
- Around line 51:
'=item' outside of any '=over'
- Around line 57:
You forgot a '=back' before '=head1'