RosettaCodeData/Task/Substring/00-TASK.txt

27 lines
1.1 KiB
Plaintext

{{basic data operation}}
[[Category:String manipulation]]
[[Category:Simple]]
[[Category:Strings]]
;Task:
Display a substring:
:* &nbsp; starting from &nbsp; '''<tt>n</tt>''' &nbsp; characters in and of &nbsp; '''<tt>m</tt>''' &nbsp; length;
:* &nbsp; starting from &nbsp; '''<tt>n'''</tt> &nbsp; characters in, &nbsp; up to the end of the string;
:* &nbsp; whole string minus the last character;
:* &nbsp; starting from a known &nbsp; character &nbsp; within the string and of &nbsp; '''<tt>m</tt>''' &nbsp; length;
:* &nbsp; starting from a known &nbsp; substring &nbsp; within the string and of &nbsp; '''<tt>m</tt>''' &nbsp; length.
<br>
If the program uses UTF-8 or UTF-16, &nbsp; it must work on any valid Unicode code point,
whether in the &nbsp; [https://en.wikipedia.org/wiki/Plane_%28Unicode%29#Basic_Multilingual_Plane Basic Multilingual Plane] &nbsp; or above it.
The program must reference logical characters (code points), &nbsp; not 8-bit code units for UTF-8 or 16-bit code units for UTF-16.
Programs for other encodings (such as 8-bit ASCII, or EUC-JP) are not required to handle all Unicode characters.
{{Template:Strings}}
<br><br>