Substring/Top and tail: Difference between revisions

Changed output. Avoided to use negatives indexes in "runeSubstr" as this may not work (bug in V1.4).
m (→‎{{header|Phix}}: added syntax colouring the hard way, phix/basics)
(Changed output. Avoided to use negatives indexes in "runeSubstr" as this may not work (bug in V1.4).)
Line 1,219:
 
let s = "Hänsel ««: 10,00€"
echo "Original: ", s
echo(s.runeSubStr(1))
echo( "With first character removed: ", s.runeSubStr(0, -1))
echo( "With last character removed: ", s.runeSubStr(10, s.runeLen - 1))
echo "With first and last characters removed: ", s.runeSubStr(1, s.runeLen - 2)
# usingUsing the runes type and slices
let r = s.toRunes
echo "With first and last characters removed (other way): ", r[1 .. ^2])</lang>
{{out}}
<pre>änselOriginal: Hänsel ««: 10,00€
HänselWith first character removed: änsel ««: 10,0000€
änselWith last character removed: Hänsel ««: 10,00
With first and last characters removed: änsel ««: 10,00</pre>
With first and last characters removed (other way): änsel ««: 10,00</pre>
 
=={{header|Objeck}}==
Anonymous user