Jump to content

Substring/Top and tail: Difference between revisions

No edit summary
Line 57:
knight
night</pre>
 
=={{header|Apex}}==
<lang java>
String strOrig = 'brooms';
String str1 = strOrig.substring(1, strOrig.length());
system.debug(str1);
String str2 = strOrig.substring(0, strOrig.length()-1);
system.debug(str2);
String str3 = strOrig.substring(1, strOrig.length()-1);
system.debug(str3);
</lang>
 
{{out}}
<pre>
rooms
 
broom
 
room
</pre>
 
=={{header|ALGOL 68}}==
Cookies help us deliver our services. By using our services, you agree to our use of cookies.