OCLOperators subString
(Created page with "=== substring ( lower : Integer, upper : Integer ) : String === Returns a string containing all characters from ''self'' starting from index *lower* up to index *upper* i...")
 
(Automatically adding template at the end of the page.)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
=== 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*.
{| class="wikitable"
{| class="wikitable"
!Expression
!Expression
Line 14: Line 14:
|''invalid''
|''invalid''
|}
|}
[[Category:OCL String Operators]]
{{Edited|July|12|2024}}

Latest revision as of 15:43, 10 February 2024

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
This page was edited 89 days ago on 02/10/2024. What links here