Substring/Top and tail: Difference between revisions
m
→{{header|Bracmat}}: changed lang to pre
No edit summary |
m (→{{header|Bracmat}}: changed lang to pre) |
||
Line 98:
));</lang>
<
String with first character removed: ημοτική
String with last character removed: Δημοτικ
String with both the first and last characters removed: ημοτικ</
If the string is known to consist of 8-byte characters, we can use a simpler method. Essential are the <code>%</code> and <code>@</code> prefixes. The <code>%</code> prefix matches 1 or more elements (bytes, in the case of string pattern matching), while <code>@</code> matches 0 or 1 elements. In combination these prefixes match 1 and only 1 byte.
Line 120:
));</lang>
<
String with first character removed: -bit string
String with last character removed: 8-bit strin
String with both the first and last characters removed: -bit strin</pre>
=={{header|C}}==
|