RosettaCodeData/Task/Substring/C-sharp/substring-2.cs
2023-07-01 13:44:08 -04:00

4 lines
166 B
C#

// B: starting from n characters in, up to the end of the string;
Console.WriteLine(s[n..]);
// C: whole string minus the last character;
Console.WriteLine(s[..^1]);