[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[m2t-dev] [MTL] Standard library issues
|
Hi Arjan,
I was looking at the specifications as to how the OCL standard library
has been extended for the needs of MTL and stumbled upon a set of issues
on which I would need your input. As I only began the implementation,
I'll only list the issues I have with the "String" operations :
1) substitute( String r, String t ) : String
Substitutes substring r in self by substring t and returns the resulting
string. If there is no occurrence of the substring, it returns the
original string.
I think it would be nice to tweak the specification so that the first
parameter would be a regular expresion instead of a plain String. I'd
love to be able to use an equivalent of the Java's "replaceAll" method
for MTL Strings.
2) toUpper() : String
Creates a copy of self with all characters converted to uppercase and
returns it.
This has been listed as a method that should be added to "extend the OCL
standard library", but this method is *already* specified in the OCL
specifications for the aforementioned library and should be removed from
the MTL specification.
3)toLower() : String
Creates a copy of self with all characters converted to lowercase and
returns it.
As above, this is already present in the OCL standard library and should
probably be removed from the MTL specification.
I will list more of these issues here as I encounter them while
implementing the specification.
Regards
Laurent Goubet
Obeo
begin:vcard
fn:Laurent Goubet
n:Goubet;Laurent
org:<a href="http://www.obeo.fr/">Obeo</a>
email;internet:laurent.goubet@xxxxxxx
url:http://www.obeo.fr
version:2.1
end:vcard