-
Key: OCL24-2
-
Legacy Issue Number: 17220
-
Status: closed
-
Source: Model Driven Solutions ( Dr. Edward Willink)
-
Summary:
The description of String::indexOf() states "No string is a substring of the empty string.".
This modifies the axiom that every string is a substring of itself. It would appear that the empty string has got confused with null.
An extension of the library with startsWith and endsWith operations would require the modified axiom to be accommodated making corner cases equivalently strange.
This modified axiom is not observed by other String libraries such as the java.lang.String.
Suggest: Replace the text:
"The empty string is considered to be a substring of every string but the empty string, at index 1. No string is a substring of the empty string."
by
"The empty string is a substring of every string at index 1 (and also at all other indexes)."
-
Reported: OCL 2.3.1 — Fri, 9 Mar 2012 05:00 GMT
-
Disposition: Resolved — OCL 2.4
-
Disposition Summary:
yes
-
Updated: Fri, 6 Mar 2015 20:57 GMT