| 2144 | } |
| 2145 | |
| 2146 | String String::substring(int startIndex, Dynamic inEndIndex) const |
| 2147 | { |
| 2148 | int endIndex = inEndIndex == null() ? length : inEndIndex->__ToInt(); |
| 2149 | if ( endIndex < 0 ) { |
| 2150 | endIndex = 0; |
| 2151 | } else if ( endIndex > length ) { |
| 2152 | endIndex = length; |
| 2153 | } |
| 2154 | |
| 2155 | if ( startIndex < 0 ) { |
| 2156 | startIndex = 0; |
| 2157 | } else if ( startIndex > length ) { |
| 2158 | startIndex = length; |
| 2159 | } |
| 2160 | |
| 2161 | if ( startIndex > endIndex ) { |
| 2162 | int tmp = startIndex; |
| 2163 | startIndex = endIndex; |
| 2164 | endIndex = tmp; |
| 2165 | } |
| 2166 | |
| 2167 | return substr( startIndex, endIndex - startIndex ); |
| 2168 | } |
| 2169 | |
| 2170 | String String::operator+(const String &inRHS) const |
| 2171 | { |
no test coverage detected