using System;
class Demo {
static void Main() {
string str = "xyz";
for (int i = 1; i < str.Length; i++) {
for (int start = 0; start <= str.Length - i; start++) {
string substr = str.Substring(start, i);
Console.WriteLine(substr);
}
}
}
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/265926.html