Substring: Difference between revisions

m
→‎{{header|Phix}}: added unicode note
m (Update Lang example: Fix spelling of Lang)
m (→‎{{header|Phix}}: added unicode note)
Line 4,386:
<span style="color: #0000FF;">?(</span><span style="color: #000000;">sentence</span><span style="color: #0000FF;">[</span><span style="color: #7060A8;">match</span><span style="color: #0000FF;">(</span><span style="color: #008000;">"aid"</span><span style="color: #0000FF;">,</span><span style="color: #000000;">sentence</span><span style="color: #0000FF;">)..$])[</span><span style="color: #000000;">1</span><span style="color: #0000FF;">..</span><span style="color: #000000;">m</span><span style="color: #0000FF;">]</span>
<!--</syntaxhighlight>-->
If sentence is UTF-8 or UTF-16, you should explicitly use sequence utf32 = utf8_to_utf32(string utf8) or sequence utf32 = utf16_to_utf32(sequence utf16) before any slicing or find()/match(), and string utf8 = utf32_to_utf8(sequence utf32) or sequence utf16 = utf32_to_utf16(sequence utf32) before display. Note that unicode does not normally display correctly on a standard Windows console, but is fine in a GUI or Linux console or a web browser.
 
=={{header|Phixmonti}}==
7,805

edits