OCLOperators subString
No edit summary
(Updated Edited template to July 12, 2025.)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<message>Write the content here to display this box</message>
=== substring ( lower : Integer, upper : Integer ) : String ===
=== substring ( lower : Integer, upper : Integer ) : String ===
Returns a string containing all characters from ''self,'' starting from index *lower* up to index *upper* included. Both *lower* and *upper* parameters should be contained between *1* and *self.size()* included. *lower* cannot be greater than *upper*.
Returns a string containing all characters from ''self,'' starting from index *lower* up to index *upper* included. Both *lower* and *upper* parameters should be contained between *1* and *self.size()* included. *lower* cannot be greater than *upper*.
Line 14: Line 15:
|''invalid''
|''invalid''
|}
|}
[[Category:OCLOperators]]
[[Category:OCL String Operators]]
[[Category:OCL String Operators]]
{{Edited|July|12|2025}}

Latest revision as of 05:58, 20 January 2025

This page was created by Lars.olofsson@mdriven.net on 2019-11-18. Last edited by Edgar on 2025-01-20.

substring ( lower : Integer, upper : Integer ) : String

Returns a string containing all characters from self, starting from index *lower* up to index *upper* included. Both *lower* and *upper* parameters should be contained between *1* and *self.size()* included. *lower* cannot be greater than *upper*.

Expression Result
'substring operation'.substring(11, 19) 'operation'
'substring operation'.substring(1, 1) 's'
'substring operation'.substring(0, 1) invalid